Bug 269844 [GlobalActions] "Close Unrelated Projects" is dangerous and needs confirmation
I20090317-1745 "Close Unrelated Projects" is a dangerous operation with and hence needs a confirmation dialog (with a "don't nag me again" checkbox, if you want). I just inadvertently executed this action from the context menu, and now I have to manually restore my workspace state. Even if Undo would work, that would still cause a full build of all closed projects.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEPreferenceInitializer.java
node.put(IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE,
				IDEInternalPreferences.PSPM_PROMPT);
		node.put(IDEInternalPreferences.OPEN_REQUIRED_PROJECTS,
				IDEInternalPreferences.PSPM_PROMPT);
		
		node.putBoolean(getHelpSeparatorKey("group.main"), true); 
		node.putBoolean(getHelpSeparatorKey("group.assist"), true); 
		node.putBoolean(getHelpSeparatorKey("group.updates"), true); 
		
		node.putBoolean(IDEInternalPreferences.LIMIT_PROBLEMS, true);
		node.putInt(IDEInternalPreferences.PROBLEMS_LIMIT, 100);
		
		node.putBoolean(IDEInternalPreferences.LIMIT_BOOKMARKS, true);
		node.putInt(IDEInternalPreferences.BOOKMARKS_LIMIT, 100);
		node.putBoolean(IDEInternalPreferences.LIMIT_TASKS, true);
		node.putInt(IDEInternalPreferences.TASKS_LIMIT, 100);
		
		node.putBoolean(IDEInternalPreferences.USE_MARKER_LIMITS, true);
		node.putInt(IDEInternalPreferences.MARKER_LIMITS_VALUE, 100);
		
		
		node.putBoolean(MarkerSupportInternalUtilities.MIGRATE_BOOKMARK_FILTERS, false);
		node.putBoolean(MarkerSupportInternalUtilities.MIGRATE_TASK_FILTERS, false);
		node.putBoolean(MarkerSupportInternalUtilities.MIGRATE_PROBLEM_FILTERS, false);
	}
	private String getHelpSeparatorKey(String groupId) {
		return "useSeparator." + IWorkbenchActionConstants.M_HELP + "." + groupId; 
	}
}