disable unnecessary parentheses intention when it is not applicable

This commit is contained in:
anna
2013-01-15 12:49:02 +01:00
parent 225296c67f
commit 1b958e20a6
3 changed files with 13 additions and 2 deletions
@@ -455,8 +455,7 @@ public class ParenthesesUtils {
return true;
}
}
return false;
}
return parentPrecedence != childPrecedence;
return parentPrecedence < childPrecedence;
}
}
@@ -0,0 +1,11 @@
package com.siyeh.ipp.parentheses;
class Inversion {
public void context(boolean a, boolean b, boolean c) {
if ((!a || <caret>!b) && !c) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
@@ -17,6 +17,7 @@ public class UnnecessaryParenthesesIntentionTest extends IPPTestCase {
public void testNotCommutative2() { doTest(); }
public void testArrayInitializer() { doTest(); }
public void testArrayAccessExpression() { doTest(); }
public void testSimplePrecedence() { assertIntentionNotAvailable(); }
@Override
protected String getRelativePath() {