public class FunctionCompletion extends VariableCompletion implements ParameterizedCompletion
ParameterizedCompletion.Parameter| Constructor and Description |
|---|
FunctionCompletion(CompletionProvider provider,
java.lang.String name,
java.lang.String returnType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDefinitionString(java.lang.StringBuilder sb) |
protected void |
addParameters(java.lang.StringBuilder sb)
Adds HTML describing the parameters to this function to a buffer.
|
int |
compareTo(Completion c2)
Overridden to compare methods by their comparison strings.
|
boolean |
equals(java.lang.Object other)
Overridden to match the behavior of
compareTo(Completion). |
java.lang.String |
getDefinitionString()
Returns the "definition string" for this function completion.
|
org.fife.ui.autocomplete.ParameterizedCompletionInsertionInfo |
getInsertionInfo(javax.swing.text.JTextComponent tc,
boolean replaceTabsWithSpaces) |
ParameterizedCompletion.Parameter |
getParam(int index)
Returns the specified
ParameterizedCompletion.Parameter. |
int |
getParamCount()
Returns the number of parameters to this function.
|
java.lang.String |
getReturnValueDescription()
Returns the description of the return value of this function.
|
boolean |
getShowParameterToolTip()
Returns whether a tool tip displaying assistance for each parameter
while it is being edited is appropriate for this completion.
|
java.lang.String |
getSummary()
Returns the description of this auto-complete choice.
|
java.lang.String |
getToolTipText()
Returns the tool tip text to display for mouse hovers over this
completion.
|
int |
hashCode() |
void |
setParams(java.util.List<ParameterizedCompletion.Parameter> params)
Sets the parameters to this function.
|
void |
setReturnValueDescription(java.lang.String desc)
Sets the description of the return value of this function.
|
getDefinedIn, getName, getType, possiblyAddDefinedIn, possiblyAddDescription, setDefinedIn, toStringgetReplacementText, getShortDescription, setShortDescription, setSummarygetAlreadyEntered, getIcon, getInputText, getProvider, getRelevance, setIcon, setRelevanceclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAlreadyEntered, getIcon, getInputText, getProvider, getRelevance, getReplacementTextpublic FunctionCompletion(CompletionProvider provider, java.lang.String name, java.lang.String returnType)
provider - The parent provider.name - The name of this function.returnType - The return type of this function.protected void addDefinitionString(java.lang.StringBuilder sb)
addDefinitionString in class VariableCompletionprotected void addParameters(java.lang.StringBuilder sb)
sb - The buffer to append to.public int compareTo(Completion c2)
compareTo in interface java.lang.Comparable<Completion>compareTo in interface CompletioncompareTo in class AbstractCompletionc2 - A Completion to compare to.public boolean equals(java.lang.Object other)
compareTo(Completion).equals in class java.lang.Objectother - Another object.public java.lang.String getDefinitionString()
printf" function, this would return
"int printf(const char *, ...)".getDefinitionString in interface ParameterizedCompletiongetDefinitionString in class VariableCompletionpublic org.fife.ui.autocomplete.ParameterizedCompletionInsertionInfo getInsertionInfo(javax.swing.text.JTextComponent tc,
boolean replaceTabsWithSpaces)
getInsertionInfo in interface ParameterizedCompletionpublic ParameterizedCompletion.Parameter getParam(int index)
ParameterizedCompletion.Parameter.getParam in interface ParameterizedCompletionindex - The index of the parameter to retrieve.ParameterizedCompletion.getParamCount()public int getParamCount()
getParamCount in interface ParameterizedCompletiongetParam(int)public boolean getShowParameterToolTip()
getShowParameterToolTip in interface ParameterizedCompletionpublic java.lang.String getReturnValueDescription()
null if there is none.setReturnValueDescription(String)public java.lang.String getSummary()
getSummary in interface CompletiongetSummary in class VariableCompletionnull if there is no description for this
completion.public java.lang.String getToolTipText()
Note that for this functionality to be enabled, a
JTextComponent must be registered with the
ToolTipManager, and the text component must know to search
for this value. In the case of an
RSyntaxTextArea, this
can be done with a org.fife.ui.rtextarea.ToolTipSupplier that
calls into
CompletionProvider.getCompletionsAt(JTextComponent, java.awt.Point).
getToolTipText in interface CompletiongetToolTipText in class VariableCompletionnull if
none.public int hashCode()
hashCode in class java.lang.Objectpublic void setParams(java.util.List<ParameterizedCompletion.Parameter> params)
params - The parameters. This should be a list of
ParameterizedCompletion.Parameters.getParam(int),
getParamCount()public void setReturnValueDescription(java.lang.String desc)
desc - The description.getReturnValueDescription()