disable on demand static imports for trivial cases
authoranna <anna.kozlova@jetbrains.com>
Fri, 17 Jun 2011 16:53:03 +0000 (20:53 +0400)
committeranna <anna.kozlova@jetbrains.com>
Fri, 17 Jun 2011 16:53:47 +0000 (20:53 +0400)
java/java-impl/src/com/intellij/codeInsight/intention/impl/AddOnDemandStaticImportAction.java

index 2ca90ad3d8288f893e15fc09d9d0e2ac9d74eec1..efe0b105545e5303471a64128c8cac0882d7c267 100644 (file)
@@ -57,7 +57,7 @@ public class AddOnDemandStaticImportAction extends PsiElementBaseIntentionAction
       return null;
     }
     PsiJavaCodeReferenceElement refExpr = (PsiJavaCodeReferenceElement)element.getParent();
-    if (refExpr.getParent() instanceof PsiJavaCodeReferenceElement &&
+    if (!(refExpr.getParent() instanceof PsiJavaCodeReferenceElement) ||
         isParameterizedReference((PsiJavaCodeReferenceElement)refExpr.getParent())) return null;
 
     PsiElement resolved = refExpr.resolve();