Bug 61539 [Wizards] Perspective switching fails
Build: I-20040506 1. Fresh workspace. 2. Create a Java project. 3. Answer yes when asked if you want to switch to the Java perspective. Nothing happens.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewProjectResourceWizard.java
*/
	private static boolean confirmPerspectiveSwitch(IWorkbenchWindow window,
			IPerspectiveDescriptor finalPersp) {
		IPreferenceStore store = IDEWorkbenchPlugin.getDefault()
				.getPreferenceStore();
		String pspm = store
				.getString(IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE);
		if (!IDEInternalPreferences.PSPM_PROMPT.equals(pspm)) {
			
			return IDEInternalPreferences.PSPM_ALWAYS.equals(pspm);
		}
		MessageDialogWithToggle dialog = MessageDialogWithToggle
				.openYesNoQuestion(window.getShell(), ResourceMessages
						.getString("NewProject.perspSwitchTitle"), 
						ResourceMessages.format(
								"NewProject.perspSwitchMessage", 
								new Object[]{finalPersp.getLabel()}),
						null ,
						false , store,
						IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE);
		int result = dialog.getReturnCode();
		if (result > 0 && dialog.getToggleState()) {
			
			IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
					IDE.Preferences.PROJECT_OPEN_NEW_PERSPECTIVE,
					IWorkbenchPreferenceConstants.NO_NEW_PERSPECTIVE);
		}
		return result == 0;
	}
}