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/dialogs/IDEWorkspacePreferencePage.java
public void init(org.eclipse.ui.IWorkbench workbench) {
        
    }
    
    /**
     * The default button has been pressed.
     */
    protected void performDefaults() {
        
        boolean autoBuild = ResourcesPlugin.getPlugin().getPluginPreferences()
                .getDefaultBoolean(ResourcesPlugin.PREF_AUTO_BUILDING);
        autoBuildButton.setSelection(autoBuild);
        IPreferenceStore store = getIDEPreferenceStore();
        autoSaveAllButton
                .setSelection(store
                        .getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD));
        saveInterval.loadDefault();
		
        boolean autoRefresh = ResourcesPlugin.getPlugin()
                .getPluginPreferences().getDefaultBoolean(
                        ResourcesPlugin.PREF_AUTO_REFRESH);
        autoRefreshButton.setSelection(autoRefresh);
        
        clearUserSettings = true;
		List encodings = WorkbenchEncoding.getDefinedEncodings();
		Collections.sort(encodings);
        encodingEditor.loadDefault();
		lineSeparatorEditor.loadDefault();
		openReferencesEditor.loadDefault();
        super.performDefaults();