Community
Participate
Working Groups
It would be quite helpful in order to improve the "Import Project" and "project managemetn after import" scenarios to set up a registry (most likely an extension point), that would allow to configure a new nature for a given project. This extension point could be consumed by the current Configure menu to show the possible natures to enable on a project, or in hthe "Nature" project property page as suggested in bug 102527 It also somehow makes sense for bug 37478, which is about importing any folder as a new project: with this mechanism, user could 1st create project, and then see a list of available natures to configure for the project This could have 2 methods: * showForProject(IProject) to determine whether to show this in the context menu (or list of available wizards in case of import of a new projecT) * applyTo(IProject) that would apply the settings of the project
Right now contributing a conversion wizard is adding the appropriate action/command to launch the contributors wizard to IWorkbenchActionConstants.M_PROJECT_CONFIGURE. If I scan what's in my SDK (eclipse classic + xtext, emf, and egit): action: Convert to Plug-in Projects... action: Convert Jars to Plug-in Projects... action: Add Xtext Nature action: Remove Xtext Nature The code I used to do it: MApplication app = (MApplication) window.getService(MApplication.class); for (MMenuContribution contribution : app.getMenuContributions()) { if (IWorkbenchActionConstants.M_PROJECT_CONFIGURE .equals(contribution.getParentId())) { for (MMenuElement element : contribution.getChildren()) { if (element instanceof MMenuItem) { System.out.println("command: " + element.getLabel()); } } } } IExtensionRegistry registry = (IExtensionRegistry) window .getService(IExtensionRegistry.class); for (IConfigurationElement element : registry .getConfigurationElementsFor("org.eclipse.ui.popupMenus")) { for (IConfigurationElement action : element.getChildren("action")) { String path = action.getAttribute("menubarPath"); if (path != null && path.startsWith(IWorkbenchActionConstants.M_PROJECT_CONFIGURE)) { System.out.println("action: " + action.getAttribute("label")); } } }
So having a guaranteed location to put a conversion wizard, only PDE and XText offer it (out of my selection). Adding an extension point would probably make it easier to offer both (the Configure submenu and a property page) but I don't see a lot of buy in and Configure has been available for quite a while now. PW