void (@NotNull PsiElement element) { final PsiBinaryExpression expression = (PsiBinaryExpression)element; final PsiExpression lhs = expression.getLOperand(); final PsiExpression rhs = expression.getROperand(); final IElementType tokenType = expression.getOperationTokenType(); assert rhs != null; CommentTracker commentTracker = new CommentTracker(); final String expString = commentTracker.text(rhs) + ComparisonUtils.getFlippedComparison(tokenType) + commentTracker.text(lhs); PsiReplacementUtil.replaceExpression(expression, expString, commentTracker); }