/** @generated */ public ShortcutCreationWizard( EObject modelElement, View view, TransactionalEditingDomain editingDomain) { referencedElementSelectionPage = new ReferencedElementSelectionPage( Messages.ShortcutCreationWizard_ReferencedElementSelectionPageName, view); referencedElementSelectionPage.setTitle( Messages.ShortcutCreationWizard_ReferencedElementSelectionPageTitle); referencedElementSelectionPage.setDescription( Messages.ShortcutCreationWizard_ReferencedElementSelectionPageDescription); referencedElementSelectionPage.setModelElement(modelElement); this.editingDomain = editingDomain; }
/** @generated */ public boolean performFinish() { CreateViewRequest.ViewDescriptor viewDescriptor = new CreateViewRequest.ViewDescriptor( new EObjectAdapter(referencedElementSelectionPage.getModelElement()), Node.class, null, EMFProfileDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT); ICommand command = new CreateCommand(editingDomain, viewDescriptor, referencedElementSelectionPage.getView()); command = command.compose( new EMFProfileCreateShortcutDecorationsCommand( editingDomain, referencedElementSelectionPage.getView(), viewDescriptor)); try { OperationHistoryFactory.getOperationHistory() .execute(command, new NullProgressMonitor(), null); } catch (ExecutionException ee) { EMFProfileDiagramEditorPlugin.getInstance() .logError("Unable to create shortcut", ee); // $NON-NLS-1$ } return true; }