Class Suggester.SuggestionContext

java.lang.Object
io.jmix.flowui.kit.component.codeeditor.autocomplete.Suggester.SuggestionContext
Enclosing interface:
Suggester

public static class Suggester.SuggestionContext extends Object
A class that describes the current state of the client-side of the JmixCodeEditor component used to prepare suggestions.
  • Field Details

    • text

      protected String text
    • cursorPosition

      protected int cursorPosition
    • prefix

      protected String prefix
  • Constructor Details

    • SuggestionContext

      public SuggestionContext(String text, int cursorPosition, String prefix)
      Parameters:
      text - current value from the client-side of the editor (may not match the server-side value)
      cursorPosition - current cursor position in the editor
      prefix - literal before current cursor position
  • Method Details

    • getText

      public String getText()
      Returns:
      current value from client-side of the editor
    • getCursorPosition

      public int getCursorPosition()
      Returns:
      current cursor position in the editor
    • getPrefix

      public String getPrefix()
      Returns:
      literal before current cursor position