Class AutoCompletions

java.lang.Object
qupath.lib.scripting.languages.AutoCompletions

public class AutoCompletions extends Object
Class to deal with script auto-completions.
Since:
v0.4.0
Author:
Pete Bankhead
  • Field Details

    • SUBSTRING_TOKENIZER

      public static final AutoCompletions.CompletionTokenizer SUBSTRING_TOKENIZER
      A completion tokenizer that simply takes the first part of the text up to the caret position.
    • JAVA_TOKENIZER

      public static final AutoCompletions.CompletionTokenizer JAVA_TOKENIZER
      A completion tokenizer that extracts a token used to determine Java completions.
  • Constructor Details

    • AutoCompletions

      public AutoCompletions()
  • Method Details

    • getComparator

      public static Comparator<AutoCompletions.Completion> getComparator()
      Get a comparator to order completions.
      Returns:
    • createJavaCompletion

      public static AutoCompletions.Completion createJavaCompletion(Class<?> declaringClass, String displayText, String completionText)
      Create a new completion with fixed display and completion text.
      Parameters:
      declaringClass - the declaring class; choose null for static imports
      displayText - the text to display
      completionText - the text to use in the completion
      Returns:
    • createJavaCompletion

      public static AutoCompletions.Completion createJavaCompletion(Class<?> cls)
      Create a new completion for a class.
      Parameters:
      cls - the class to complete
      Returns:
    • createJavaCompletion

      public static AutoCompletions.Completion createJavaCompletion(Class<?> declaringClass, Field field)
      Create a new completion for a field.
      Parameters:
      declaringClass - the parent class; choose null for static imports
      field - the field
      Returns:
    • createJavaCompletion

      public static AutoCompletions.Completion createJavaCompletion(Class<?> declaringClass, Method method)
      Create a new completion for a method.
      Parameters:
      declaringClass - the parent class; choose null for static imports
      method - the method
      Returns: