void (@NotNull PsiElement element, @NotNull ActionContext context, @NotNull ModPsiUpdater updater) { final GrStatement containingStatement = (GrStatement)element; if (ExpandBooleanPredicate.isBooleanAssignment(containingStatement)) { final GrAssignmentExpression assignmentExpression = (GrAssignmentExpression)containingStatement; final GrExpression rhs = assignmentExpression.getRValue(); assert rhs != null; final String rhsText = rhs.getText(); final GrExpression lhs = assignmentExpression.getLValue(); final String lhsText = lhs.getText(); @NonNls final String statement = "if(" + rhsText + "){\n" + lhsText + " = true\n}else{\n" + lhsText + " = false\n}"; PsiImplUtil.replaceStatement(statement, containingStatement); } else if (ExpandBooleanPredicate.isBooleanReturn(containingStatement)) { final GrReturnStatement returnStatement = (GrReturnStatement)containingStatement; final GrExpression returnValue = returnStatement.getReturnValue(); final String valueText = returnValue.getText(); @NonNls final String statement = "if(" + valueText + "){\nreturn true\n}else{\nreturn false\n}"; PsiImplUtil.replaceStatement(statement, containingStatement); } }