use of com.intellij.codeInsight.lookup.CharFilter in project intellij-community by JetBrains.
the class LookupTypedHandler method getFiltersDecision.
@Nullable
private static CharFilter.Result getFiltersDecision(char charTyped, LookupImpl lookup) {
lookup.checkValid();
LookupElement item = lookup.getCurrentItem();
int prefixLength = item == null ? lookup.getAdditionalPrefix().length() : lookup.itemPattern(item).length();
for (final CharFilter extension : getFilters()) {
final CharFilter.Result result = extension.acceptChar(charTyped, prefixLength, lookup);
if (result != null) {
return result;
}
if (lookup.isLookupDisposed()) {
throw new AssertionError("Lookup disposed after " + extension);
}
}
return null;
}
Aggregations