@Override
  protected GroovyPsiElement doSurroundElements(PsiElement[] elements, PsiElement context) throws IncorrectOperationException {
    for (PsiElement element : elements) {
      if (element instanceof GroovyPsiElement) {
        ((GroovyPsiElement) element).accept(new MyMemoizingVisitor());
      }
    }

    GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(elements[0].getProject());
    final GrMethodCallExpression call = (GrMethodCallExpression) factory.createExpressionFromText("{ -> \n}.call()", context);
    final GrClosableBlock closure = (GrClosableBlock) ((GrReferenceExpression) call.getInvokedExpression()).getQualifierExpression();
    addStatements(closure, elements);
    return call;
  }
@Override
  protected GroovyPsiElement doSurroundElements(PsiElement[] elements, PsiElement context)