@Override public IWorkbenchWizard createWizard() throws CoreException { return wizardElement.createWizard(); } };
@Override public IWorkbenchWizard createWizard() throws CoreException { return wizardElement.createWizard(); } };
@Override public IWorkbenchWizard createWizard() throws CoreException { return wizardElement.createWizard(); } };
@Override public IWorkbenchWizard createWizard() throws CoreException { return wizardElement.createWizard(); } };
@Override public IWorkbenchWizard createWizard() throws CoreException { return wizardElement.createWizard(); } };
final String MAVEN_IMPORT_WIZARD_ID = "org.eclipse.m2e.core.wizards.Maven2ImportWizard"; final IWizardDescriptor mavenImportWizardDescriptor = PlatformUI .getWorkbench() .getImportWizardRegistry() .findWizard(MAVEN_IMPORT_WIZARD_ID); if (mavenImportWizardDescriptor != null) { final IWizard mavenImportWizard = mavenImportWizardDescriptor.createWizard(); final WizardDialog mavenImportWizardDialog = new WizardDialog(getShell(), mavenImportWizard); mavenImportWizardDialog.open(); } else { // Wizard not found - e.g. if m2e is not installed. // Notify user. }
public void openWizard(String id) { // First see if this is a "new wizard". IWizardDescriptor descriptor = PlatformUI.getWorkbench() .getNewWizardRegistry().findWizard(id); // If not check if it is an "import wizard". if (descriptor == null) { descriptor = PlatformUI.getWorkbench().getImportWizardRegistry() .findWizard(id); } // Or maybe an export wizard if (descriptor == null) { descriptor = PlatformUI.getWorkbench().getExportWizardRegistry() .findWizard(id); } try { // Then if we have a wizard, open it. if (descriptor != null) { **IWizard wizard = descriptor.createWizard();** **//here you can set the first show page** WizardDialog wd = new WizardDialog(getStandardDisplay() .getActiveShell(), wizard); wd.setTitle(wizard.getWindowTitle()); wd.open(); } } catch (CoreException e) { e.printStackTrace(); } }
IWizard wizard = descriptor.createWizard();
private IWizard createChildWizard(String id, String parentWizModelName) { NewProjectDataModelFacetWizard wizard = null; IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry(); IWizardDescriptor wizardDescriptor = newWizardRegistry.findWizard(id); try { // retrieve the model of the parent wizard IDataModel parentWizModel = getDataModel().getNestedModel(parentWizModelName); // create the child wizard and retrieve its model wizard = (NewProjectDataModelFacetWizard) wizardDescriptor.createWizard(); IDataModel childWizModel = wizard.getDataModel(); // copy the properties of the parent wizard's model to the child wizard's model Iterator props = parentWizModel.getBaseProperties().iterator(); while (props.hasNext()) { String prop = (String) props.next(); childWizModel.setProperty(prop, parentWizModel.getProperty(prop)); } int a = 1; } catch (CoreException ce) { Logger.getLogger().log(ce); } return wizard; }
/** * This action has been invoked by the user */ public void run() { // create instance of target wizard IWorkbenchWizard wizard; try { wizard = descriptor.createWizard(); } catch (CoreException e) { ErrorDialog.openError(window.getShell(), CommonNavigatorMessages.NewProjectWizard_errorTitle, CommonNavigatorMessages.NewProjectAction_text, e .getStatus()); return; } ISelection selection = window.getSelectionService().getSelection(); if (selection instanceof IStructuredSelection) { wizard .init(window.getWorkbench(), (IStructuredSelection) selection); } else { wizard.init(window.getWorkbench(), StructuredSelection.EMPTY); } Shell parent = window.getShell(); WizardDialog dialog = new WizardDialog(parent, wizard); dialog.create(); // WorkbenchHelp.setHelp(dialog.getShell(), // IWorkbenchHelpContextIds.NEW_WIZARD_SHORTCUT); dialog.open(); }
public static IWizard createWizard(String id) { // First see if this is a "new wizard". IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(id); // If not check if it is an "import wizard". if (descriptor == null) { descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(id); } // Or maybe an export wizard if (descriptor == null) { descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(id); } try { // Then if we have a wizard, open it. if (descriptor != null) { IWizard wizard = descriptor.createWizard(); return wizard; } } catch (CoreException e) { e.printStackTrace(); } return null; }
public void openWizard(Shell shell, IWorkbench workbench, IStructuredSelection selection, String id) { // First see if this is a "new wizard". IWizardDescriptor descriptor = PlatformUI.getWorkbench() .getNewWizardRegistry().findWizard(id); // If not check if it is an "import wizard". if (descriptor == null) { descriptor = PlatformUI.getWorkbench().getImportWizardRegistry() .findWizard(id); } // Or maybe an export wizard if (descriptor == null) { descriptor = PlatformUI.getWorkbench().getExportWizardRegistry() .findWizard(id); } try { // Then if we have a wizard, open it. if (descriptor != null) { IWizard wizard = descriptor.createWizard(); ((IWorkbenchWizard) wizard).init(workbench, selection); WizardDialog wd = new WizardDialog(shell, wizard); wd.setTitle(wizard.getWindowTitle()); wd.open(); } } catch (CoreException e) { e.printStackTrace(); } } }
wizard = (INewWizard) wizardElement.createWizard(); } catch (CoreException e) { ErrorDialog.openError(window.getShell(), WorkbenchMessages.NewWizardShortcutAction_errorTitle,
IWorkbenchWizard wizard = wizardDescriptor.createWizard(); wizard.init(PlatformUI.getWorkbench(), getSelectionToUse(event));
if (descriptor != null) { try { wizard = descriptor.createWizard(); } catch (CoreException e) { PDEPlugin.log(e);