void (@NotNull ActionContext context, @NotNull PsiAssignmentExpression assignmentExpression, @NotNull ModPsiUpdater updater) { PsiExpression rExpression = assignmentExpression.getRExpression(); if (rExpression == null) return; Project project = context.project(); PsiBinaryExpression comparisonExpr = (PsiBinaryExpression)JavaPsiFacade.getElementFactory(project).createExpressionFromText("a==b", assignmentExpression); comparisonExpr.getLOperand().replace(assignmentExpression.getLExpression()); PsiExpression rOperand = comparisonExpr.getROperand(); assert rOperand != null; rOperand.replace(rExpression); CodeStyleManager.getInstance(project).reformat(assignmentExpression.replace(comparisonExpr)); }