cheaper LookupElement.as

This commit is contained in:
peter
2011-02-07 12:49:27 +01:00
parent 456b8d2356
commit 8c69c69acf
20 changed files with 90 additions and 38 deletions
@@ -974,7 +974,7 @@ public class JavaCompletionUtil {
if (smart || needRightParenth && addCompletionChar) {
TailType toInsert = tailType;
LookupItem lookupItem = item.as(LookupItem.class);
LookupItem lookupItem = item.as(LookupItem.CLASS_CONDITION_KEY);
if (lookupItem == null || lookupItem.getAttribute(LookupItem.TAIL_TYPE_ATTR) != TailType.UNKNOWN) {
if (!hasTail && item.getObject() instanceof PsiMethod && ((PsiMethod)item.getObject()).getReturnType() == PsiType.VOID) {
PsiDocumentManager.getInstance(file.getProject()).commitAllDocuments();