public class BasicCompletion extends AbstractCompletion
Completion
implementation. This implementation
can be used if you have a relatively short number of static completions
with no (or short) summaries.
This implementation uses the replacement text as the input text. It also
includes a "short description" field, which (if non-null
), is
used in the completion choices list.
构造器和说明 |
---|
BasicCompletion(CompletionProvider provider,
java.lang.String replacementText)
Constructor.
|
BasicCompletion(CompletionProvider provider,
java.lang.String replacementText,
java.lang.String shortDesc)
Constructor.
|
BasicCompletion(CompletionProvider provider,
java.lang.String replacementText,
java.lang.String shortDesc,
java.lang.String summary)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getReplacementText()
Returns the text to insert as the result of this auto-completion.
|
java.lang.String |
getShortDescription()
Returns the short description of this completion, usually used in
the completion choices list.
|
java.lang.String |
getSummary()
Returns the description of this auto-complete choice.
|
void |
setShortDescription(java.lang.String shortDesc)
Sets the short description of this completion.
|
void |
setSummary(java.lang.String summary)
Sets the summary for this completion.
|
java.lang.String |
toString()
Returns a string representation of this completion.
|
compareTo, getAlreadyEntered, getIcon, getInputText, getProvider, getRelevance, getToolTipText, setRelevance
public BasicCompletion(CompletionProvider provider, java.lang.String replacementText)
provider
- The parent completion provider.replacementText
- The text to replace.public BasicCompletion(CompletionProvider provider, java.lang.String replacementText, java.lang.String shortDesc)
provider
- The parent completion provider.replacementText
- The text to replace.shortDesc
- A short description of the completion. This will be
displayed in the completion list. This may be null
.public BasicCompletion(CompletionProvider provider, java.lang.String replacementText, java.lang.String shortDesc, java.lang.String summary)
provider
- The parent completion provider.replacementText
- The text to replace.shortDesc
- A short description of the completion. This will be
displayed in the completion list. This may be null
.summary
- The summary of this completion. This should be HTML.
This may be null
.public java.lang.String getReplacementText()
Completion.getInputText()
public java.lang.String getShortDescription()
null
if there is none.setShortDescription(String)
public java.lang.String getSummary()
null
if there is no description for this
completion.public void setShortDescription(java.lang.String shortDesc)
shortDesc
- The short description of this completion.getShortDescription()
public void setSummary(java.lang.String summary)
summary
- The summary for this completion.getSummary()
public java.lang.String toString()
null
, this method will return:
getInputText() + " - " + shortDesc
otherwise, it will return getInputText().toString
在类中 AbstractCompletion