Interface Suggester

All Known Implementing Classes:
SourceCodeEditorImpl.SourceCodeEditorSuggester

public interface Suggester
  • Method Details

    • getSuggestions

      List<Suggestion> getSuggestions(String text, int cursor)
      Returns a list of Suggestions based on text and cursor position.
      Parameters:
      text -
      cursor -
      Returns:
      list of Suggestions, empty list = no suggestions
    • applySuggestion

      String applySuggestion(Suggestion sugg, String text, int cursor)
      Applies the suggestion to the text. text and cursor are the same that were given to getSuggestions(String, int) earlier. sugg is one of the objects received from getSuggestions(String, int) So if you gave a subclass of Suggestion, that you shall receive.
      Parameters:
      sugg -
      text -
      cursor -
      Returns:
      Text after the suggestion has been applied.