Package qupath.lib.scripting.languages
Class AutoCompletions
java.lang.Object
qupath.lib.scripting.languages.AutoCompletions
Class to deal with script auto-completions.
- Since:
- v0.4.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceA single completion.static interfaceFunctional interface to extract a token from a string needed to determine a completion.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final AutoCompletions.CompletionTokenizerA completion tokenizer that extracts a token used to determine Java completions.static final AutoCompletions.CompletionTokenizerA completion tokenizer that simply takes the first part of the text up to the caret position.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic AutoCompletions.CompletioncreateJavaCompletion(Class<?> cls) Create a new completion for a class.static AutoCompletions.CompletioncreateJavaCompletion(Class<?> declaringClass, Field field) Create a new completion for a field.static AutoCompletions.CompletioncreateJavaCompletion(Class<?> declaringClass, Method method) Create a new completion for a method.static AutoCompletions.CompletioncreateJavaCompletion(Class<?> declaringClass, String displayText, String completionText) Create a new completion with fixed display and completion text.static Comparator<AutoCompletions.Completion> Get a comparator to order completions.
- 
Field Details- 
SUBSTRING_TOKENIZERA completion tokenizer that simply takes the first part of the text up to the caret position.
- 
JAVA_TOKENIZERA completion tokenizer that extracts a token used to determine Java completions.
 
- 
- 
Constructor Details- 
AutoCompletionspublic AutoCompletions()
 
- 
- 
Method Details- 
getComparatorGet a comparator to order completions.- Returns:
 
- 
createJavaCompletionpublic 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:
 
- 
createJavaCompletionCreate a new completion for a class.- Parameters:
- cls- the class to complete
- Returns:
 
- 
createJavaCompletionCreate a new completion for a field.- Parameters:
- declaringClass- the parent class; choose null for static imports
- field- the field
- Returns:
 
- 
createJavaCompletionpublic 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:
 
 
-