From bf92826812d65e9c73e75327aef438fc3cc497e4 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 2 Jul 2010 16:24:17 +0400 Subject: [PATCH] introduce: process parenthesis correctly --- .../java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java b/java/java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java index e378a4905596..992de1cdb61b 100644 --- a/java/java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java @@ -173,7 +173,7 @@ public class CodeInsightUtil { addExpressionOccurrences(RefactoringUtil.unparenthesizeExpression(expr), array, scope); boolean found = false; for (PsiExpression psiExpression : array) { - if (areExpressionsEquivalent(RefactoringUtil.unparenthesizeExpression(psiExpression), RefactoringUtil.unparenthesizeExpression(expr))) { + if (PsiTreeUtil.isAncestor(expr, psiExpression, false) || PsiTreeUtil.isAncestor(psiExpression, expr, false)) { found = true; break; }