@Override
  @SuppressWarnings("unchecked")
  public Object execute(ExecutionEvent event) throws ExecutionException {
    try {
      CompilationUnitEditor targetCompilationUnitEditor =
          findTargetCompilationUnitEditor(event);

      // Find the containing class.
      AbstractTypeDeclaration typeNode = getTypeNode(targetCompilationUnitEditor);

      // Common info
      AST ast = typeNode.getRoot().getAST();
      ASTRewrite astRewrite = ASTRewrite.create(ast);

      int positionOfLastMemberFieldFound = addMemberField(typeNode, ast, astRewrite);
      addOrChangeConstructors(typeNode, ast, astRewrite, positionOfLastMemberFieldFound);

      MultiTextEdit multiTextEdit = new MultiTextEdit();

      IDocument document =
          JavaUI.getDocumentProvider().getDocument(
              targetCompilationUnitEditor.getEditorInput());
      TextEdit edit = astRewrite.rewriteAST(document, null);
      multiTextEdit.addChild(edit);

      IUndoManager undoManager =
          ((TextViewer) targetCompilationUnitEditor.getViewer())
              .getUndoManager();
      undoManager.beginCompoundChange();
      multiTextEdit.apply(document);
      undoManager.endCompoundChange();
      
      setInPlaceEditingOfRecentlyAddedNodes(targetCompilationUnitEditor);
      
    } catch (BadLocationException e) {
      throw new ExecutionException(
          "Error accessing cursor location in document", e);
    }

    return null;
  }