public abstract class LookupElementDecorator<T extends LookupElement> extends LookupElement
PrioritizedLookupElement
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
LookupElementDecorator(T delegate) |
Modifier and Type | Method and Description |
---|---|
<T> T |
as(java.lang.Class<T> clazz)
Return the first element of the given class in a
LookupElementDecorator wrapper chain. |
<T> T |
as(ClassConditionKey<T> conditionKey)
Prefer to use
LookupElement.as(Class) |
boolean |
equals(java.lang.Object o) |
java.util.Set<java.lang.String> |
getAllLookupStrings() |
AutoCompletionPolicy |
getAutoCompletionPolicy() |
T |
getDelegate() |
java.lang.String |
getLookupString() |
java.lang.Object |
getObject() |
PsiElement |
getPsiElement() |
void |
handleInsert(InsertionContext context) |
int |
hashCode() |
boolean |
isCaseSensitive() |
boolean |
isValid() |
boolean |
isWorthShowingInAutoPopup()
Invoked when the completion autopopup contains only the items that exactly match the user-entered prefix to determine
whether the popup should be closed to not get in the way when navigating through the code.
|
void |
renderElement(LookupElementPresentation presentation) |
java.lang.String |
toString() |
static <T extends LookupElement> |
withInsertHandler(T element,
InsertHandler<? super LookupElementDecorator<T>> insertHandler) |
static <T extends LookupElement> |
withRenderer(T element,
LookupElementRenderer<? super LookupElementDecorator<T>> visagiste) |
requiresCommittedDocuments
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
protected LookupElementDecorator(T delegate)
public T getDelegate()
public boolean isValid()
isValid
in class LookupElement
public java.lang.String getLookupString()
getLookupString
in class LookupElement
public java.util.Set<java.lang.String> getAllLookupStrings()
getAllLookupStrings
in class LookupElement
public java.lang.Object getObject()
getObject
in class LookupElement
public void handleInsert(InsertionContext context)
handleInsert
in class LookupElement
public AutoCompletionPolicy getAutoCompletionPolicy()
getAutoCompletionPolicy
in class LookupElement
public java.lang.String toString()
toString
in class LookupElement
public void renderElement(LookupElementPresentation presentation)
renderElement
in class LookupElement
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static <T extends LookupElement> LookupElementDecorator<T> withInsertHandler(T element, InsertHandler<? super LookupElementDecorator<T>> insertHandler)
public static <T extends LookupElement> LookupElementDecorator<T> withRenderer(T element, LookupElementRenderer<? super LookupElementDecorator<T>> visagiste)
public <T> T as(ClassConditionKey<T> conditionKey)
LookupElement
LookupElement.as(Class)
as
in class LookupElement
public <T> T as(java.lang.Class<T> clazz)
LookupElement
LookupElementDecorator
wrapper chain.
If this object is not a decorator, return it if it's instance of the given class, otherwise null.as
in class LookupElement
public boolean isCaseSensitive()
isCaseSensitive
in class LookupElement
public boolean isWorthShowingInAutoPopup()
LookupElement
isWorthShowingInAutoPopup
in class LookupElement
public PsiElement getPsiElement()
getPsiElement
in class LookupElement
LookupElement.getObject()
result.