preserve comments: negated if else

This commit is contained in:
Anna.Kozlova
2017-12-07 15:51:06 +01:00
parent 35cafcf62e
commit ef5565903b
@@ -113,7 +113,7 @@ public class NegatedIfElseInspection extends BaseInspection {
}
}
@NonNls final String newStatement = "if(" + negatedCondition + ')' + elseText + " else " + tracker.markUnchanged(thenBranch).getText();
PsiReplacementUtil.replaceStatement(ifStatement, newStatement);
PsiReplacementUtil.replaceStatement(ifStatement, newStatement, tracker);
}
}