Class EditorInlineSuggestOptions

java.lang.Object
org.primefaces.shaded.json.JSONObject
org.primefaces.extensions.model.monacoeditor.EditorInlineSuggestOptions
All Implemented Interfaces:
Serializable

public class EditorInlineSuggestOptions extends org.primefaces.shaded.json.JSONObject implements Serializable
Control the behavior and rendering of the inline completions.
See Also:
  • Constructor Details

    • EditorInlineSuggestOptions

      public EditorInlineSuggestOptions()
  • Method Details

    • isEnabled

      public Boolean isEnabled()
      Returns:
      Enable or disable the rendering of automatic inline completions.
    • setEnabled

      public EditorInlineSuggestOptions setEnabled(Boolean enabled)
      Parameters:
      enabled - Enable or disable the rendering of automatic inline completions.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • isKeepOnBlur

      public Boolean isKeepOnBlur()
      Returns:
      Does not clear active inline suggestions when the editor loses focus.
    • setKeepOnBlur

      public EditorInlineSuggestOptions setKeepOnBlur(Boolean keepOnBlur)
      Parameters:
      keepOnBlur - Does not clear active inline suggestions when the editor loses focus.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • getMode

      public String getMode()
      Returns:
      Configures the mode. Use prefix to only show ghost text if the text to replace is a prefix of the suggestion text. Use
      invalid reference
      subword
      to only show ghost text if the replace text is a sub word of the suggestion text. Use
      invalid reference
      subwordSmart
      to only show ghost text if the replace text is a sub word of the suggestion text, but the sub word must start after the cursor position. Defaults to prefix.
    • setMode

      Parameters:
      mode - Configures the mode. Use prefix to only show ghost text if the text to replace is a prefix of the suggestion text. Use
      invalid reference
      subword
      to only show ghost text if the replace text is a sub word of the suggestion text. Use
      invalid reference
      subwordSmart
      to only show ghost text if the replace text is a sub word of the suggestion text, but the sub word must start after the cursor position. Defaults to prefix.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • setMode

      public EditorInlineSuggestOptions setMode(String mode)
      Parameters:
      mode - Configures the mode. Use prefix to only show ghost text if the text to replace is a prefix of the suggestion text. Use
      invalid reference
      subword
      to only show ghost text if the replace text is a sub word of the suggestion text. Use
      invalid reference
      subwordSmart
      to only show ghost text if the replace text is a sub word of the suggestion text, but the sub word must start after the cursor position. Defaults to prefix.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • getShowToolbar

      public String getShowToolbar()
      Returns:
      Configures whether to show the inline suggest toolbar.
    • setShowToolbar

      public EditorInlineSuggestOptions setShowToolbar(EShowToolbarMode showToolbar)
      Parameters:
      showToolbar - Configures whether to show the inline suggest toolbar.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • setShowToolbar

      public EditorInlineSuggestOptions setShowToolbar(String showToolbar)
      Parameters:
      showToolbar - Configures whether to show the inline suggest toolbar.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • isSuppressSuggestions

      public Boolean isSuppressSuggestions()
    • setSuppressSuggestions

      public EditorInlineSuggestOptions setSuppressSuggestions(Boolean suppressSuggestions)