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/extensions/org/eclipse/ui/actions/CloseUnrelatedProjectsAction.java
set.makeSet(projects[i]);
		}
		for (int i = 0; i < projects.length; i++) {
			try {
				IProject[] references = projects[i].getReferencedProjects();
				
				
				for (int j = 0; j < references.length; j++) {
					Object setOne = set.findSet(projects[i]);
					
					Object setTwo = set.findSet(references[j]);
					
					if (setOne != null && setTwo != null && setOne != setTwo)
						set.union(setOne, setTwo);
				}
			} catch (CoreException e) {
				
			}
		}
		return set;
	}
	/**
	 * Creates this action.
	 * 
	 * @param shell
	 *            The shell to use for parenting any dialogs created by this
	 *            action.
	 *            
	 * @deprecated {@link #CloseUnrelatedProjectsAction(IShellProvider)}
	 */