- All Superinterfaces:
Comparable<Completion>
,Completion
- All Known Implementing Classes:
FunctionCompletion
,TemplateCompletion
A completion option that takes parameters, such as a function or method.
In order to use any instance of a ParameterizedCompletion
, you need
to call AutoCompletion#setParameterAssistanceEnabled(boolean)
with
a value of true
first. Otherwise, any completion choices will be
visible in the completion list, but won't insert anything when selected.
- Version:
- 1.0
- Author:
- Robert Futrell
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A parameter passed to a parameterizedCompletion
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the "definition string" for this completion.getInsertionInfo
(AutoCompletableTextArea tc, boolean replaceTabsWithSpaces) Returns completion information for this parameterized completion, given the specified text component.getParam
(int index) Returns the specifiedParameterizedCompletion.Parameter
.int
Returns the number of parameters this completion takes.boolean
Returns whether a tool tip displaying assistance for each parameter while it is being edited is appropriate for this completion.Methods inherited from interface de.grogra.pf.ui.autocomplete.impl.Completion
compareTo, getAlreadyEntered, getCompareString, getIcon, getInputText, getProvider, getRelevance, getReplacementText, getSummary, getToolTipText
-
Method Details
-
getDefinitionString
String getDefinitionString()Returns the "definition string" for this completion. For example, for the C "printf
" function, this would return "int printf(const char *, ...)
".- Returns:
- The definition string.
-
getParam
Returns the specifiedParameterizedCompletion.Parameter
.- Parameters:
index
- The index of the parameter to retrieve.- Returns:
- The parameter.
- See Also:
-
getParamCount
int getParamCount()Returns the number of parameters this completion takes.- Returns:
- The number of parameters this completion takes.
- See Also:
-
getInsertionInfo
ParameterizedCompletionInsertionInfo getInsertionInfo(AutoCompletableTextArea tc, boolean replaceTabsWithSpaces) Returns completion information for this parameterized completion, given the specified text component.- Parameters:
tc
- The text component.replaceTabsWithSpaces
- Whether to replace tabs with spaces.- Returns:
- The completion info.
-
getShowParameterToolTip
boolean getShowParameterToolTip()Returns whether a tool tip displaying assistance for each parameter while it is being edited is appropriate for this completion.- Returns:
- Whether the tool tip is appropriate to display.
-