void (@NotNull PsiElement element) { final PsiAssignmentExpression assignmentExpression = (PsiAssignmentExpression)element; final PsiExpression lhs = assignmentExpression.getLExpression(); CommentTracker commentTracker = new CommentTracker(); final String lhsText = commentTracker.text(lhs); final PsiExpression rhs = PsiUtil.skipParenthesizedExprDown(assignmentExpression.getRExpression()); if (!(rhs instanceof PsiBinaryExpression binaryExpression)) { return; } final IElementType tokenType = binaryExpression.getOperationTokenType(); if (JavaTokenType.PLUS.equals(tokenType)) { PsiReplacementUtil.replaceExpression(assignmentExpression, lhsText + "++", commentTracker); } else if (JavaTokenType.MINUS.equals(tokenType)) { PsiReplacementUtil.replaceExpression(assignmentExpression, lhsText + "--", commentTracker); } }