Bug 53122 [Actions] Rebuild Project does not auto-save files
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
* Returns whether there are builders configured on the given project.
     *
     * @return <code>true</code> if it has builders,
     *   <code>false</code> if not, or if this couldn't be determined
     */
    boolean hasBuilder(IProject project) {
        try {
            ICommand[] commands = project.getDescription().getBuildSpec();
            if (commands.length > 0) {
                return true;
            }
        } catch (CoreException e) {
            
            
            
            
        }
        return false;
    }
    /* (non-Javadoc)
     * Method declared on WorkspaceAction.
     */
    void invokeOperation(IResource resource, IProgressMonitor monitor)
            throws CoreException {
        ((IProject) resource).build(buildType, monitor);
    }
    
    /* (non-Javadoc)
     * Method declared on Action
     */