public abstract class TextFieldWithAutoCompletionListProvider<T> extends DefaultTextCompletionValueDescriptor<T> implements TextCompletionProvider
getItems(String, boolean, CompletionParameters)
, see fillCompletionVariants(CompletionParameters, String, CompletionResultSet)
);
setItems(Collection)
).
Otherwise, use ValuesCompletionProvider
for completion from a fixed set of elements
or TextFieldCompletionProvider
in other cases.
DefaultTextCompletionValueDescriptor.StringValueDescriptor
Modifier and Type | Field and Description |
---|---|
protected java.util.Collection<T> |
myVariants |
Modifier | Constructor and Description |
---|---|
protected |
TextFieldWithAutoCompletionListProvider(java.util.Collection<T> variants) |
Modifier and Type | Method and Description |
---|---|
CharFilter.Result |
acceptChar(char c) |
CompletionResultSet |
applyPrefixMatcher(CompletionResultSet result,
java.lang.String prefix) |
PrefixMatcher |
createPrefixMatcher(java.lang.String prefix) |
void |
fillCompletionVariants(CompletionParameters parameters,
java.lang.String prefix,
CompletionResultSet result) |
java.lang.String |
getAdvertisement()
Completion list advertisement text, if null advertisement for documentation
popup will be shown
|
static java.lang.String |
getCompletionPrefix(CompletionParameters parameters) |
java.util.Collection<T> |
getItems(java.lang.String prefix,
boolean cached,
CompletionParameters parameters) |
java.lang.String |
getPrefix(java.lang.String text,
int offset) |
protected java.lang.String |
getQuickDocHotKeyAdvertisementTail(java.lang.String shortcut) |
void |
setAdvertisement(java.lang.String completionAdvertisement) |
void |
setItems(java.util.Collection<T> variants) |
compare, createInsertHandler, createLookupBuilder, getIcon, getLookupString, getTailText, getTypeText
protected java.util.Collection<T> myVariants
protected TextFieldWithAutoCompletionListProvider(java.util.Collection<T> variants)
public java.lang.String getPrefix(java.lang.String text, int offset)
getPrefix
in interface TextCompletionProvider
public CompletionResultSet applyPrefixMatcher(CompletionResultSet result, java.lang.String prefix)
applyPrefixMatcher
in interface TextCompletionProvider
public CharFilter.Result acceptChar(char c)
acceptChar
in interface TextCompletionProvider
public void fillCompletionVariants(CompletionParameters parameters, java.lang.String prefix, CompletionResultSet result)
fillCompletionVariants
in interface TextCompletionProvider
public void setItems(java.util.Collection<T> variants)
public java.util.Collection<T> getItems(java.lang.String prefix, boolean cached, CompletionParameters parameters)
public java.lang.String getAdvertisement()
getAdvertisement
in interface TextCompletionProvider
protected java.lang.String getQuickDocHotKeyAdvertisementTail(java.lang.String shortcut)
public void setAdvertisement(java.lang.String completionAdvertisement)
public PrefixMatcher createPrefixMatcher(java.lang.String prefix)
public static java.lang.String getCompletionPrefix(CompletionParameters parameters)