public class LookupItem<T> extends MutableLookupElement<T> implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
CASE_INSENSITIVE |
static ClassConditionKey<LookupItem> |
CLASS_CONDITION_KEY |
static LookupItem[] |
EMPTY_ARRAY |
static java.lang.Object |
FORCE_QUALIFY |
static java.lang.Object |
HIGHLIGHTED_ATTR |
static java.lang.Object |
ICON_ATTR |
static java.lang.Object |
TAIL_TEXT_ATTR |
static java.lang.Object |
TAIL_TEXT_SMALL_ATTR |
static Key<TailType> |
TAIL_TYPE_ATTR |
static java.lang.Object |
TYPE_TEXT_ATTR |
Constructor and Description |
---|
LookupItem(T o,
java.lang.String lookupString)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
LookupItem<T> |
addLookupStrings(java.lang.String... additionalLookupStrings) |
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
LookupItem<T> |
forceQualify() |
static LookupItem |
fromString(java.lang.String s)
Deprecated.
|
java.util.Set<java.lang.String> |
getAllLookupStrings() |
<T> T |
getAttribute(Key<T> key) |
java.lang.Object |
getAttribute(java.lang.Object key) |
AutoCompletionPolicy |
getAutoCompletionPolicy() |
static TailType |
getDefaultTailType(char completionChar) |
InsertHandler<? extends LookupItem> |
getInsertHandler() |
java.lang.String |
getLookupString()
Returns a string which will be inserted to the editor when this item is
choosen.
|
T |
getObject()
Returns a data object.
|
java.lang.String |
getPresentableText() |
double |
getPriority() |
TailType |
getTailType() |
static TailType |
handleCompletionChar(Editor editor,
LookupElement lookupElement,
char completionChar) |
void |
handleInsert(InsertionContext context) |
int |
hashCode() |
boolean |
isBold() |
boolean |
isCaseSensitive() |
void |
renderElement(LookupElementPresentation presentation) |
<T> void |
setAttribute(Key<T> key,
T value) |
void |
setAttribute(java.lang.Object key,
java.lang.Object value) |
LookupItem<T> |
setAutoCompletionPolicy(AutoCompletionPolicy policy) |
LookupItem<T> |
setBold() |
LookupItem<T> |
setIcon(javax.swing.Icon icon) |
LookupItem<T> |
setInsertHandler(InsertHandler<? extends LookupElement> handler) |
void |
setLookupString(java.lang.String lookupString) |
void |
setObject(T o) |
LookupItem<T> |
setPresentableText(java.lang.String displayText) |
LookupItem<T> |
setPriority(double priority) |
MutableLookupElement<T> |
setTailText(java.lang.String text,
boolean grayed) |
LookupItem<T> |
setTailType(TailType type) |
java.lang.String |
toString() |
as, as, getPsiElement, isValid, isWorthShowingInAutoPopup, requiresCommittedDocuments
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
public static final ClassConditionKey<LookupItem> CLASS_CONDITION_KEY
public static final java.lang.Object HIGHLIGHTED_ATTR
public static final java.lang.Object ICON_ATTR
public static final java.lang.Object TYPE_TEXT_ATTR
public static final java.lang.Object TAIL_TEXT_ATTR
public static final java.lang.Object TAIL_TEXT_SMALL_ATTR
public static final java.lang.Object FORCE_QUALIFY
public static final java.lang.Object CASE_INSENSITIVE
public static final LookupItem[] EMPTY_ARRAY
@Deprecated public LookupItem(T o, java.lang.String lookupString)
LookupElementBuilder
@Deprecated public static LookupItem fromString(java.lang.String s)
LookupElementBuilder
public void setObject(T o)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class LookupElement
public T getObject()
getObject
in class MutableLookupElement<T>
public java.lang.String getLookupString()
getLookupString
in class LookupElement
public void setLookupString(java.lang.String lookupString)
public java.lang.Object getAttribute(java.lang.Object key)
public <T> T getAttribute(Key<T> key)
public void setAttribute(java.lang.Object key, java.lang.Object value)
public <T> void setAttribute(Key<T> key, T value)
public InsertHandler<? extends LookupItem> getInsertHandler()
getInsertHandler
in class MutableLookupElement<T>
public boolean isBold()
isBold
in class MutableLookupElement<T>
public void handleInsert(InsertionContext context)
handleInsert
in class LookupElement
public static TailType getDefaultTailType(char completionChar)
public static TailType handleCompletionChar(Editor editor, LookupElement lookupElement, char completionChar)
public TailType getTailType()
public LookupItem<T> setTailType(TailType type)
setTailType
in class MutableLookupElement<T>
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public LookupItem<T> setInsertHandler(InsertHandler<? extends LookupElement> handler)
setInsertHandler
in class MutableLookupElement<T>
public void renderElement(LookupElementPresentation presentation)
renderElement
in class LookupElement
public LookupItem<T> setBold()
setBold
in class MutableLookupElement<T>
public LookupItem<T> forceQualify()
public LookupItem<T> setAutoCompletionPolicy(AutoCompletionPolicy policy)
setAutoCompletionPolicy
in class MutableLookupElement<T>
public AutoCompletionPolicy getAutoCompletionPolicy()
getAutoCompletionPolicy
in class LookupElement
public LookupItem<T> setIcon(javax.swing.Icon icon)
setIcon
in class MutableLookupElement<T>
public LookupItem<T> setPriority(double priority)
setPriority
in class MutableLookupElement<T>
public final double getPriority()
public LookupItem<T> setPresentableText(java.lang.String displayText)
setPresentableText
in class MutableLookupElement<T>
public java.lang.String getPresentableText()
public MutableLookupElement<T> setTailText(java.lang.String text, boolean grayed)
public LookupItem<T> addLookupStrings(java.lang.String... additionalLookupStrings)
addLookupStrings
in class MutableLookupElement<T>
public java.util.Set<java.lang.String> getAllLookupStrings()
getAllLookupStrings
in class LookupElement
public boolean isCaseSensitive()
isCaseSensitive
in class LookupElement