void (PsiAssignmentExpression expression) { final PsiExpression lhs = expression.getLExpression(); final PsiExpression rhs = PsiUtil.skipParenthesizedExprDown(expression.getRExpression()); final IElementType tokenType = expression.getOperationTokenType(); final String assignString; if (tokenType.equals(JavaTokenType.ASTERISKEQ)) { assignString = "<<="; } else { assignString = ">>="; } CommentTracker commentTracker = new CommentTracker(); final String expString = commentTracker.text(lhs) + assignString + ShiftUtils.getLogBase2(rhs); PsiReplacementUtil.replaceExpression(expression, expString, commentTracker); }