void (@NotNull PsiElement element) { final PsiBinaryExpression expression = (PsiBinaryExpression)element; final PsiExpression lhs = expression.getLOperand(); final PsiExpression rhs = expression.getROperand(); final String negatedOperator = ComparisonUtils.getNegatedComparison(expression.getOperationTokenType()); final String lhsText = lhs.getText(); assert rhs != null; final String rhsText = rhs.getText(); CommentTracker tracker = new CommentTracker(); tracker.markUnchanged(lhs); tracker.markUnchanged(rhs); PsiReplacementUtil.replaceExpressionWithNegatedExpression(expression, lhsText + negatedOperator + rhsText, tracker); }