@Override public void run() { WizardDialog dialog = new WizardDialog(null, new Wizard() { private HadoopLocationWizard page = new HadoopLocationWizard(); @Override public void addPages() { super.addPages(); setWindowTitle("New Hadoop location..."); addPage(page); } @Override public boolean performFinish() { page.performFinish(); return true; } }); dialog.create(); dialog.setBlockOnOpen(true); dialog.open(); super.run(); }
@Execute public void execute(@Preference(nodePath = "org.bbaw.bts.app") IEclipsePreferences prefs, IEclipseContext context, ApplicationStartupController startupController) { // PartHolderDialog dialog = ContextInjectionFactory.make(PartHolderDialog.class, context); // // context.set(UserManagementDialog.class, dialog); // // if (dialog.open() == dialog.OK) // { // } Wizard w = new InstallationWizard(context, startupController, null, null); WizardDialog dialog = new WizardDialog(new Shell(), w); if (dialog.open() == dialog.OK) { System.out.println("new project created."); } }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = StatemachineDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE .createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { StatemachineDiagramEditorPlugin.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 StatemachineNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, StatemachineEditPart.MODEL_ID)); StatemachineDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
@Override public WizardPage getNextPage() { refreshData(); switch(dsType) { case DS_VIEW: if (!(pageData.wizardPage[2] instanceof WizardSubPageDataView)) { pageData.wizardPage[2] = new WizardSubPageDataView(pageData); ((Wizard)getWizard()).addPage(pageData.wizardPage[2]); } return(pageData.wizardPage[2]); case DS_DOC: if (!(pageData.wizardPage[2] instanceof WizardSubPageFormTable)) { pageData.wizardPage[2] = new WizardSubPageFormTable(pageData); ((Wizard)getWizard()).addPage(pageData.wizardPage[2]); } return(pageData.wizardPage[2]); } return null; }
@Override public WizardPage getNextPage() { refreshData(); // Get the Next Sub Main Page // If pages provide more Sub Pages this function // should be overridden int newPageNumber = getSubPageNumber()+1; if(newPageNumber < wizardData.getPageCount()) { WizardDataSub pd = wizardData.pageList.get(newPageNumber); if(pd != null) { if (pd.wizardPage[0] == null) { pd.wizardPage[0] = new WizardSubPageMain(pd); ((Wizard)getWizard()).addPage(pd.wizardPage[0]); } return(pd.wizardPage[0]); } } return null; }
@Override public WizardPage getNextPage() { refreshData(); if(wizardData.pageList.size() > 0) { // Add the first sub page WizardDataSub pd = wizardData.pageList.get(0); if (pd != null) { if (pd.wizardPage[0] == null) { pd.wizardPage[0] = new WizardSubPageMain(pd); ((Wizard)(getWizard())).addPage(pd.wizardPage[0]); } return(pd.wizardPage[0]); } } return(null); }
@Override public void run() { IWorkbench workbench = PlatformUI.getWorkbench(); IStructuredSelection selection = null; if(editor != null ){ IFileEditorInput editorInput = (IFileEditorInput) editor.getEditorInput().getAdapter(IFileEditorInput.class); if(editorInput != null ){ selection = new StructuredSelection(editorInput.getFile().getProject()); } } Wizard wizard = null; NativeBinaryExportWizard wiz = new NativeBinaryExportWizard(); wiz.init(workbench, selection); wizard = wiz; WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard); dialog.open(); }
@Override protected Wizard createWizardFor(Object selectedObject) { if (!(selectedObject instanceof VariationPointGroup)) { return null; } RenameEObjectEAttributeWrapper wrapper = new RenameEObjectEAttributeWrapper("Variation Point Group", (VariationPointGroup) selectedObject, variabilityPackage.eINSTANCE.getCustomizableNameHaving_Name()) { @Override public String getAttributeValue() { return ((CustomizableNameHaving) getElement()).getName(); } }; return new RenameElementWizard(wrapper); }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = SmcDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE .createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { SmcDiagramEditorPlugin.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 SmcNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, SystemEditPart.MODEL_ID)); SmcDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * The user has invoked this action. */ public void run() { Shell shell= VerilogPlugin.getActiveWorkbenchShell(); try { Wizard wizard= createWizard(); if (wizard instanceof IWorkbenchWizard) { ((IWorkbenchWizard)wizard).init(getWorkbench(), getCurrentSelection()); } WizardDialog dialog= new WizardDialog(shell, wizard); dialog.create(); int res= dialog.open(); notifyResult(res == Window.OK); } catch (CoreException e) { MessageUI.error(e); } }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = Wc2014DiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE .createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { Wc2014DiagramEditorPlugin.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 Wc2014NewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, WorldCupEditPart.MODEL_ID)); Wc2014DiagramEditorUtil .runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * Performs the SilverStripe version specific tasks when creating new project layout project * @param project Destination project * @param monitor Monitor to update when creating the layout * @param templateRegistry Template registry to look through * @param isFrameworkLayout If the project is a framework only project this is set to true * @throws CoreException */ public void createProjectLayout(Wizard wizard, IProject project, IProgressMonitor monitor, ContextTypeRegistry templateRegistry, TemplateStore templateStore, boolean isFrameworkLayout) throws CoreException { //Generate the Page.php file if(isFrameworkLayout==false) { Template pageTemplateToCompile=templateStore.findTemplateById("ca.edchipman.silverstripepdt.SilverStripe.templates.newssproject.ss30.defaultpage"); PHPTemplateStore.CompiledTemplate pageTemplate=PHPTemplateStore.compileTemplate(templateRegistry, pageTemplateToCompile, project.getName()+"/code", "Page.php"); new SilverStripeFileCreator().createFile(wizard, project.getName()+"/code", "Page.php", monitor, pageTemplate.string, pageTemplate.offset); } //Generate the _config.php file Template configTemplateToCompile; if(isFrameworkLayout) { configTemplateToCompile=templateStore.findTemplateById("ca.edchipman.silverstripepdt.SilverStripe.templates.newssproject.ss30.framework.config"); }else { configTemplateToCompile=templateStore.findTemplateById("ca.edchipman.silverstripepdt.SilverStripe.templates.newssproject.ss30.config"); } PHPTemplateStore.CompiledTemplate configTemplate=PHPTemplateStore.compileTemplate(templateRegistry, configTemplateToCompile, project.getName(), "_config.php"); new SilverStripeFileCreator().createFile(wizard, project.getName(), "_config.php", monitor, configTemplate.string, configTemplate.offset, true); }
public void createFile(IProgressMonitor monitor) throws CoreException,InterruptedException { final String containerName = firstPage.getContainerName(); final String fileName = firstPage.getFileName(); this.resetTableViewerInput(); IScriptProject project = null; IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IResource resource = root.findMember(new Path(containerName)); if (!resource.exists() || !(resource instanceof IContainer)) { project = DLTKCore.create(resource.getProject()); } String lineSeparator = Util.getLineSeparator(null, project); final PHPTemplateStore.CompiledTemplate template=this.compileTemplate(containerName, fileName, lineSeparator); try { new FileCreator().createFile((Wizard) this.getWizard(), containerName, fileName, monitor, template.string, template.offset); saveLastSavedPreferences(); } finally { monitor.done(); } }
/** * * We can either launch the {@link seg.jUCMNav.views.wizards.scenarios.EditEnumerationsWizard} or the * {@link seg.jUCMNav.views.wizards.scenarios.AddVariableWizard}. Executes the command returned by getCommand(); * * @see org.eclipse.jface.action.IAction#run() */ public void run() { if (wizard) { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); Wizard _wizard; StructuredSelection selection = new StructuredSelection(getSelectedObjects()); if (ScenarioUtils.sTypeEnumeration.equals(type)) { _wizard = new EditEnumerationsWizard(); ((EditEnumerationsWizard) _wizard).init(PlatformUI.getWorkbench(), selection); } else { _wizard = new AddVariableWizard(); ((AddVariableWizard) _wizard).init(PlatformUI.getWorkbench(), selection); } WizardDialog dialog = new WizardDialog(shell, _wizard); dialog.open(); } else super.run(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditorPlugin .getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$ } if (diagramRoot == null) { MessageDialog.openError(getShell(), edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogTitle, edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogMessage); return; } Wizard wizard = new edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVONewDiagramFileWizard( domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind( edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.InitDiagramFile_WizardTitle, edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.SequenceDiagramEditPart.MODEL_ID)); edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditorUtil .runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { MIDDiagramEditorPlugin.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 MIDNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, MIDEditPart.MODEL_ID)); MIDDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { MIDDiagramEditorPlugin.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 MIDNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, ModelRelEditPart.MODEL_ID)); MIDDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditorPlugin .getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$ } if (diagramRoot == null) { MessageDialog.openError(getShell(), edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogTitle, edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogMessage); return; } Wizard wizard = new edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVONewDiagramFileWizard( domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind( edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.InitDiagramFile_WizardTitle, edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.RelationalDatabaseEditPart.MODEL_ID)); edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditorUtil .runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = RelationalDatabaseDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE .createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { RelationalDatabaseDiagramEditorPlugin.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 RelationalDatabaseNewDiagramFileWizard( domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, RelationalDatabaseEditPart.MODEL_ID)); RelationalDatabaseDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorPlugin.getInstance() .logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$ } if (diagramRoot == null) { MessageDialog.openError(getShell(), edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogTitle, edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogMessage); return; } Wizard wizard = new edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVONewDiagramFileWizard( domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle( NLS.bind(edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.InitDiagramFile_WizardTitle, edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.IStarEditPart.MODEL_ID)); edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = IStarDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE .createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { IStarDiagramEditorPlugin.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 IStarNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, IStarEditPart.MODEL_ID)); IStarDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = StateMachineDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVODiagramEditorPlugin .getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$ } if (diagramRoot == null) { MessageDialog.openError(getShell(), edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogTitle, edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.InitDiagramFile_ResourceErrorDialogMessage); return; } Wizard wizard = new edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVONewDiagramFileWizard( domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind( edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.InitDiagramFile_WizardTitle, edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateMachineEditPart.MODEL_ID)); edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVODiagramEditorUtil .runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }
/** * Runs the wizard in a dialog. * * @generated */ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) { IDialogSettings pluginDialogSettings = StateDiagramEditorPlugin .getInstance().getDialogSettings(); IDialogSettings wizardDialogSettings = pluginDialogSettings .getSection(settingsKey); if (wizardDialogSettings == null) { wizardDialogSettings = pluginDialogSettings .addNewSection(settingsKey); } wizard.setDialogSettings(wizardDialogSettings); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
/** * @generated */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE .createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet.getResource(domainModelURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { StateDiagramEditorPlugin.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 StateNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain); wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, StateEditPart.MODEL_ID)); StateDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$ }