void (@NotNull PsiElement element, @NotNull ActionContext context, @NotNull ModPsiUpdater updater) { final String text = invokeImpl(element); final GrExpression newExpr = GroovyPsiElementFactory.getInstance(context.project()).createExpressionFromText(text); ((GrExpression)element).replaceWithExpression(newExpr, true); }