/** @generated */
 @Override
 public void run(IAction action) {
   TransactionalEditingDomain editingDomain =
       WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
   ResourceSet resourceSet = editingDomain.getResourceSet();
   EObject diagramRoot = null;
   try {
     Resource resource = resourceSet.getResource(domainModelURI, true);
     diagramRoot = resource.getContents().get(0);
   } catch (WrappedException ex) {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Unable to load resource: " + domainModelURI, ex); // $NON-NLS-1$
   }
   if (diagramRoot == null) {
     MessageDialog.openError(
         getShell(),
         Messages.InitDiagramFile_ResourceErrorDialogTitle,
         Messages.InitDiagramFile_ResourceErrorDialogMessage);
     return;
   }
   Wizard wizard = new UMLNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
   wizard.setWindowTitle(
       NLS.bind(Messages.InitDiagramFile_WizardTitle, ActivityDiagramEditPart.MODEL_ID));
   UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); // $NON-NLS-1$
 }
 /**
  * Create a new transactional editing domain.
  *
  * <p>In this case a WorkspaceEditingDomainFactory which is a subtype of
  * TransactionalEditingDomain.
  */
 @Override
 public TransactionalEditingDomain createEditingDomain() {
   TransactionalEditingDomain result =
       WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
   return result;
 }