misc optimizations for showing lookup with many elements:

- using ContainerUtil.toArray
- cheaper checks of relevance to Java-specific weighers
- avoid expensive Class#isInstanceOf of LookupElement#as using:
     * LookupItem#from with explicit instanceof LookupItem (caring of LookupElementDecorator)
     * isCaseSensitive introduced to LookupElement
This commit is contained in:
Maxim.Mossienko
2010-04-22 18:30:43 +04:00
parent 3373672fed
commit 6a80949468
9 changed files with 34 additions and 18 deletions
@@ -789,9 +789,8 @@ public class JavaCompletionUtil {
return typed.getType();
}
final PsiType qualifierType = getPsiType(element.getObject());
final LookupItem lookupItem = element.as(LookupItem.class);
final LookupItem lookupItem = LookupItem.from(element);
if (lookupItem != null) {
final Object o = lookupItem.getAttribute(LookupItem.TYPE);
if (o instanceof PsiType) {