Bug 85587 [IDE] Save before clean all
The test plan for Platform UI states that a build should prompt to save unsaved resources. However, when we "clean all", no such prompt appears. Should it?
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
if (selection[i] instanceof IResource) {
				projects.add(((IResource) selection[i]).getProject());
			} else if (selection[i] instanceof IAdaptable) {
				IAdaptable adaptable = (IAdaptable) selection[i];
				IResource resource = (IResource) adaptable.getAdapter(IResource.class);
				if (resource != null)
					projects.add(resource.getProject());
			}
		}
		return (IProject[]) projects.toArray(new IProject[projects.size()]);
	}
	/**
	 * Finds and returns the selected projects in the given window
	 * 
	 * @param window The window to find the selection in
	 * @return The selected projects, or an empty array if no selection could be found.
	 */
	public static IProject[] findSelectedProjects(IWorkbenchWindow window) {
		if (window == null)
			return new IProject[0];
		ISelection selection = window.getSelectionService().getSelection();
		IProject[] selected = null;
		if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
			selected = extractProjects(((IStructuredSelection) selection).toArray());
		} else {
			
			IWorkbenchPart part = window.getPartService().getActivePart();
			if (part instanceof IEditorPart) {
                IEditorPart editor = (IEditorPart) part; 
                IFile file = ResourceUtil.getFile(editor.getEditorInput());