1. org.eclipse.jface.wizard.WizardDialog.WizardDialog(ShellparentShell, IWizard newWizard)
dialog.open()
2.com.huawei.ide.foundation.common.ui.util.WizardUtils.openWizard(String)
public static void openWizard(String wizardId)
{
WizardProviderwizardProvider = newWizardProvider();
QuickAccessElementelementForId = wizardProvider.getElementForId(wizardId);
if (null != elementForId && elementForId instanceof WizardElement)
{
WizardElementwizardElement = (WizardElement)elementForId;
wizardElement.execute();
}
}
或
IWizardDescriptorfindWizard = PlatformUI.getWorkbench()
.getNewWizardRegistry()
.findWizard("com.huawei.ebus.ide.process.ui.newprocessWizard");
IWorkbenchWizardcreateWizard;
try
{
createWizard =findWizard.createWizard();
createWizard.init(PlatformUI.getWorkbench(),
getStructuredSelection());
WizardDialog dialog = new WizardDialog(Display.getCurrent()
.getActiveShell(),createWizard);
if (dialog.open() == Dialog.OK)
{
}
}
catch (CoreExceptione)
{
// TODO Auto-generated catch block
e.printStackTrace();
}