public enum AutoCompletionPolicy extends java.lang.Enum<AutoCompletionPolicy>
applyPolicy(LookupElement)
to decorate LookupElement
with correct policy.
Use this only in simple cases, use CompletionContributor.handleAutoCompletionPossibility(com.intellij.codeInsight.completion.AutoCompletionContext)
for finer tuning.Enum Constant and Description |
---|
ALWAYS_AUTOCOMPLETE
Self-explaining.
|
GIVE_CHANCE_TO_OVERWRITE
If caret is positioned inside an identifier, and 'auto-complete if only one choice' is configured in settings,
a lookup with one item will still open, giving user a chance to overwrite the identifier using Tab key
|
NEVER_AUTOCOMPLETE
Self-explaining.
|
SETTINGS_DEPENDENT
If 'auto-complete if only one choice' is configured in settings, the item will be inserted, otherwise - no.
|
Modifier and Type | Method and Description |
---|---|
LookupElement |
applyPolicy(LookupElement element) |
static AutoCompletionPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AutoCompletionPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AutoCompletionPolicy NEVER_AUTOCOMPLETE
public static final AutoCompletionPolicy SETTINGS_DEPENDENT
public static final AutoCompletionPolicy GIVE_CHANCE_TO_OVERWRITE
public static final AutoCompletionPolicy ALWAYS_AUTOCOMPLETE
public static AutoCompletionPolicy[] values()
for (AutoCompletionPolicy c : AutoCompletionPolicy.values()) System.out.println(c);
public static AutoCompletionPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic LookupElement applyPolicy(LookupElement element)