public abstract class LookupArranger extends java.lang.Object implements WeighingContext
Modifier and Type | Class and Description |
---|---|
static class |
LookupArranger.DefaultArranger |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<LookupElement> |
myItems |
Constructor and Description |
---|
LookupArranger() |
Modifier and Type | Method and Description |
---|---|
void |
addElement(LookupElement item,
LookupElementPresentation presentation) |
abstract Pair<java.util.List<LookupElement>,java.lang.Integer> |
arrangeItems(Lookup lookup,
boolean onExplicitAction) |
void |
clear() |
abstract LookupArranger |
createEmptyCopy() |
java.util.List<LookupElement> |
getMatchingItems() |
protected java.util.List<LookupElement> |
getPrefixItems(boolean exactly) |
java.util.Map<LookupElement,java.util.List<Pair<java.lang.String,java.lang.Object>>> |
getRelevanceObjects(java.lang.Iterable<? extends LookupElement> items,
boolean hideSingleValued) |
boolean |
isCompletion() |
protected boolean |
isPrefixItem(LookupElement item,
boolean exactly) |
PrefixMatcher |
itemMatcher(LookupElement item) |
java.lang.String |
itemPattern(LookupElement element) |
void |
itemSelected(LookupElement lookupItem,
char completionChar) |
void |
prefixChanged(Lookup lookup) |
void |
prefixReplaced(Lookup lookup,
java.lang.String newPrefix) |
void |
prefixTruncated(LookupEx lookup,
int hideOffset)
Called when the prefix has been truncated farther than the additional prefix typed while the lookup was visible.
|
void |
registerMatcher(LookupElement item,
PrefixMatcher matcher) |
protected java.util.List<LookupElement> |
retainItems(java.util.Set<LookupElement> retained) |
protected final java.util.List<LookupElement> myItems
public void addElement(LookupElement item, LookupElementPresentation presentation)
public void clear()
public void registerMatcher(LookupElement item, PrefixMatcher matcher)
public java.lang.String itemPattern(LookupElement element)
itemPattern
in interface WeighingContext
public PrefixMatcher itemMatcher(LookupElement item)
itemMatcher
in interface WeighingContext
public void itemSelected(LookupElement lookupItem, char completionChar)
public final void prefixReplaced(Lookup lookup, java.lang.String newPrefix)
public void prefixChanged(Lookup lookup)
protected java.util.List<LookupElement> retainItems(java.util.Set<LookupElement> retained)
public abstract Pair<java.util.List<LookupElement>,java.lang.Integer> arrangeItems(Lookup lookup, boolean onExplicitAction)
public abstract LookupArranger createEmptyCopy()
protected java.util.List<LookupElement> getPrefixItems(boolean exactly)
protected boolean isPrefixItem(LookupElement item, boolean exactly)
public java.util.List<LookupElement> getMatchingItems()
public java.util.Map<LookupElement,java.util.List<Pair<java.lang.String,java.lang.Object>>> getRelevanceObjects(java.lang.Iterable<? extends LookupElement> items, boolean hideSingleValued)
items
- the items to give relevance weight forhideSingleValued
- whether criteria that gave same values for all items should be skippedpublic void prefixTruncated(LookupEx lookup, int hideOffset)
public boolean isCompletion()