public void init(String wizardId, String packName, String typeName) { wizard = (NewElementWizard) WorkbenchUtils.findWizardByDefId(wizardId); tck = ResourcesPlugin.getWorkspace().getRoot().getProject("tck"); jp = EclipseUtil.getJavaProject(tck); wizard.init(CDIUIPlugin.getDefault().getWorkbench(), new StructuredSelection(jp)); if (wizard instanceof NewCDIElementWizard) { ((NewCDIElementWizard) wizard).setOpenEditorAfterFinish(false); } else if (wizard instanceof NewAnnotationLiteralCreationWizard) { ((NewAnnotationLiteralCreationWizard) wizard).setOpenEditorAfterFinish(false); } dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard); dialog.setBlockOnOpen(false); dialog.open(); page = (NewTypeWizardPage) dialog.getSelectedPage(); setTypeName(packName, typeName); }
public void init(IWorkbench workbench, IStructuredSelection selection) { page = new NewMessageDrivenBeanWizardPage(); this.selection = selection; super.init(workbench, selection); }