Module platform

Class ChildrenCompletionProvider

All Implemented Interfaces:
CompletionProvider

public class ChildrenCompletionProvider extends AbstractCompletionProvider
A completion provider that do not manage the completion itself. The parent it processing it.
  • Constructor Details

    • ChildrenCompletionProvider

      public ChildrenCompletionProvider()
  • Method Details

    • checkProviderAndAdd

      protected void checkProviderAndAdd(Completion c)
      Overrides:
      checkProviderAndAdd in class AbstractCompletionProvider
    • getAlreadyEnteredText

      public String getAlreadyEnteredText(AutoCompletableTextArea comp)
      Description copied from interface: CompletionProvider
      Returns the text just before the current caret position that could be the start of something auto-completable.
      Parameters:
      comp - The text component.
      Returns:
      The text. A return value of null means nothing should be auto-completed; a value of an empty string ("") means auto-completion should still be considered (i.e., all possible choices are valid).
    • isValidChar

      public boolean isValidChar(char c)
      Description copied from interface: CompletionProvider
      Test if a char is valid for this completion
    • getCompletionsAt

      public List<Completion> getCompletionsAt(AutoCompletableTextArea comp, Point p)
      Description copied from interface: CompletionProvider
      Returns the completions that have been entered at the specified visual location. This can be used for tool tips when the user hovers the mouse over completed text.
      Parameters:
      comp - The text component.
      p - The position, usually from a MouseEvent.
      Returns:
      The completions, or an empty list if there are none.
    • getParameterizedCompletions

      public List<ParameterizedCompletion> getParameterizedCompletions(AutoCompletableTextArea tc)
      Description copied from interface: CompletionProvider
      Returns a list of parameterized completions that have been entered at the current caret position of a text component (and thus can have their completion choices displayed).
      Parameters:
      tc - The text component.
      Returns:
      The list of ParameterizedCompletions. If no completions are available, this may be null.