Bug 55036 [Perspectives] Workbench switch perspective when new project is created, even if setup to no switch
I200403161300 I have the preference workbench>perspectives>'switch to associated perspective when creating new project' set 'Never switch'. I create a java project and the workbench switch to the java perspective (my current perspective was a custom perspective based on the java perspective).
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewProjectResourceWizard.java
if (!IDEInternalPreferences.PSPM_PROMPT.equals(pspm)) {
		return true;
	}
	MessageDialogWithToggle dialog = MessageDialogWithToggle.openQuestion(
		window.getShell(),
		ResourceMessages.getString("NewProject.perspSwitchTitle"), 
		ResourceMessages.format(
			"NewProject.perspSwitchMessage", 
			new Object[] { finalPersp.getLabel() }),
		null,	
		false); 
	int result = dialog.getReturnCode();
	if (result >= 0 && dialog.getToggleState()) {
		if (result == 0) {
			
			store.setValue(IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE, IDEInternalPreferences.PSPM_ALWAYS);
			
		} else {
			
			store.setValue(IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE, IDEInternalPreferences.PSPM_NEVER);
			
			IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
				IDE.Preferences.PROJECT_OPEN_NEW_PERSPECTIVE,
				IWorkbenchPreferenceConstants.NO_NEW_PERSPECTIVE);
		}
	}
	return result == 0;
}
}