Bug 44162 [Wizards] Define constants for wizard ids of new.file, new.folder, and new.project
In perspective factories, plugins have to reference the New wizards with a string that is susceptible to change during API reorganizations. For example, in org.eclipse.ui.internal.ResourcePerspective: // Add "new wizards". layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ There are constants for most view id's, for example IPageLayout.ID_RES_NAV, but not for these. This request is to add constants for the new wizard ids in the appropriate location. In addition to new.folder and new.file above, you also need a constant for new.project. There may be others but those are the only ones I found in a search.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewProjectResourceWizard.java
IPreferenceConstants.OPEN_PERSP_MODE);
		
		if (workbenchPerspectiveSetting == IPreferenceConstants.OPM_NEW_WINDOW) {
			openInNewWindow(finalPersp);
			return;
		}
		
		replaceCurrentPerspective(finalPersp);
	}
	/**
	 * Adds to the list all perspective IDs in the Workbench who's original ID
	 * matches the given ID.
	 * 
	 * @param perspectiveIds
	 *            the list of perspective IDs to supplement.
	 * @param id
	 *            the id to query.
	 * @since 3.0
	 */
	private static void addPerspectiveAndDescendants(List perspectiveIds,
			String id) {
		IPerspectiveRegistry registry = PlatformUI.getWorkbench()
				.getPerspectiveRegistry();
		IPerspectiveDescriptor[] perspectives = registry.getPerspectives();
		for (int i = 0; i < perspectives.length; i++) {
			
			
			PerspectiveDescriptor descriptor = ((PerspectiveDescriptor) perspectives[i]);
			if (descriptor.getOriginalId().equals(id)) {
				perspectiveIds.add(descriptor.getId());