|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fife.ui.autocomplete.AbstractCompletion
org.fife.ui.autocomplete.BasicCompletion
org.fife.ui.autocomplete.VariableCompletion
public class VariableCompletion
A completion for a variable (or constant) in a programming language.
This completion type uses its shortDescription property as part of
its summary returned by getSummary(); for this reason, it may be
a little longer (even much longer), if desired, than what is recommended
for BasicCompletions (where the shortDescription is used
in toString() for ListCellRenderers).
| Constructor Summary | |
|---|---|
VariableCompletion(CompletionProvider provider,
String name,
String type)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addDefinitionString(StringBuffer sb)
|
String |
getDefinedIn()
Returns where this variable is defined. |
String |
getDefinitionString()
|
String |
getName()
Returns the name of this variable. |
String |
getSummary()
Returns the description of this auto-complete choice. |
String |
getToolTipText()
Returns the tool tip text to display for mouse hovers over this completion. |
String |
getType()
Returns the type of this variable. |
protected void |
possiblyAddDefinedIn(StringBuffer sb)
Adds some HTML describing where this variable is defined, if this information is known. |
protected boolean |
possiblyAddDescription(StringBuffer sb)
Adds the description text as HTML to a buffer, if a description is defined. |
void |
setDefinedIn(String definedIn)
Sets where this variable is defined. |
String |
toString()
Overridden to return the name of the variable being completed. |
| Methods inherited from class org.fife.ui.autocomplete.BasicCompletion |
|---|
getReplacementText, getShortDescription, setShortDescription, setSummary |
| Methods inherited from class org.fife.ui.autocomplete.AbstractCompletion |
|---|
compareTo, getAlreadyEntered, getInputText, getProvider, getRelevance, setRelevance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VariableCompletion(CompletionProvider provider,
String name,
String type)
provider - The parent provider.name - The name of this variable.type - The type of this variable (e.g. "int",
"String", etc.).| Method Detail |
|---|
protected void addDefinitionString(StringBuffer sb)
public String getDefinitionString()
public String getDefinedIn()
setDefinedIn(String)public String getName()
public String getSummary()
getSummary in interface CompletiongetSummary in class BasicCompletionnull if there is no description for this
completion.public 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 AbstractCompletionnull if
none.public String getType()
protected void possiblyAddDefinedIn(StringBuffer sb)
sb - The buffer to append to.protected boolean possiblyAddDescription(StringBuffer sb)
sb - The buffer to append to.
public void setDefinedIn(String definedIn)
definedIn - Where this variable is defined.getDefinedIn()public String toString()
toString in class BasicCompletion
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||