void (@NotNull PsiElement element) { final PsiAssignmentExpression assignment = (PsiAssignmentExpression)element; final PsiExpression expression = assignment.getLExpression(); CommentTracker commentTracker = new CommentTracker(); final String expressionText = commentTracker.text(expression); final IElementType tokenType = assignment.getOperationTokenType(); final String newExpressionText; if (JavaTokenType.PLUSEQ.equals(tokenType)) { newExpressionText = expressionText + "++"; } else if (JavaTokenType.MINUSEQ.equals(tokenType)) { newExpressionText = expressionText + "--"; } else { return; } PsiReplacementUtil.replaceExpression(assignment, newExpressionText, commentTracker); }