Community
Participate
Working Groups
My commonWizards create new elements and I'd like these new elements be selected in the viewer after their creation. I could not find a nice way to let my wizards know about the viewer or its content provider. I'm using the following trick but it feels nasty: final CDOCheckoutContentProvider contentProvider = getContentProvider(); final IWizardRegistry wizardRegistry = PlatformUI.getWorkbench().getNewWizardRegistry(); IWizardRegistry wrapperRegistry = new IWizardRegistry() { public IWizardCategory getRootCategory() { return wizardRegistry.getRootCategory(); } public IWizardDescriptor[] getPrimaryWizards() { return wizardRegistry.getPrimaryWizards(); } public IWizardDescriptor findWizard(String id) { IWizardDescriptor wizard = wizardRegistry.findWizard(id); if (wizard instanceof AbstractNewWizard) { AbstractNewWizard newWizard = (AbstractNewWizard)wizard; newWizard.setContentProvider(contentProvider); } return wizard; } public IWizardCategory findCategory(String id) { return wizardRegistry.findCategory(id); } }; newWizardActionGroup = new WizardActionGroup(window, wrapperRegistry, WizardActionGroup.TYPE_NEW, extensionSite.getContentService()); It would be cool if there was a "context" injection interface for wizards like ICommonContentProvider or ICommonLabelProvider.