Bug 296800 [GlobalActions] UI build actions should not lock the workspace
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
}
        
        String[] orderedNames = ResourcesPlugin.getWorkspace().getDescription()
                .getBuildOrder();
        if (orderedNames != null) {
            List orderedProjects = new ArrayList(toBuild.size());
            IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
            for (int i = 0; i < orderedNames.length; i++) {
                IProject handle = root.getProject(orderedNames[i]);
                if (toBuild.contains(handle)) {
                    orderedProjects.add(handle);
                    toBuild.remove(handle);
                }
            }
            
            orderedProjects.addAll(toBuild);
            return orderedProjects;
        }
        
        IProject[] projects = new IProject[toBuild.size()];
        projects = (IProject[]) toBuild.toArray(projects);
        IWorkspace.ProjectOrder po = ResourcesPlugin.getWorkspace()
                .computeProjectOrder(projects);
        ArrayList orderedProjects = new ArrayList();
        orderedProjects.addAll(Arrays.asList(po.projects));
        return orderedProjects;
    }
    /* (non-Javadoc)
     * Method declared on IAction; overrides method on WorkspaceAction.
     * This override allows the user to save the contents of selected