Bug 53122 [Actions] Rebuild Project does not auto-save files
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
* Creates a new action of the appropriate type. The action id is 
     * <code>ID_BUILD</code> for incremental builds and <code>ID_REBUILD_ALL</code>
     * for full builds.
     *
     * @param shell the shell for any dialogs
     * @param type the type of build; one of
     *  <code>IncrementalProjectBuilder.INCREMENTAL_BUILD</code> or 
     *  <code>IncrementalProjectBuilder.FULL_BUILD</code>
     */
    public BuildAction(Shell shell, int type) {
        super(shell, "");
        if (type == IncrementalProjectBuilder.INCREMENTAL_BUILD) {
            setText(IDEWorkbenchMessages.getString("BuildAction.text")); 
            setToolTipText(IDEWorkbenchMessages
                    .getString("BuildAction.toolTip")); 
            setId(ID_BUILD);
            WorkbenchHelp.setHelp(this,
                    IIDEHelpContextIds.INCREMENTAL_BUILD_ACTION);
        } else {
            setText(IDEWorkbenchMessages.getString("RebuildAction.text")); 
            setToolTipText(IDEWorkbenchMessages
                    .getString("RebuildAction.tooltip")); 
            setId(ID_REBUILD_ALL);
            WorkbenchHelp.setHelp(this, IIDEHelpContextIds.FULL_BUILD_ACTION);
        }
        this.buildType = type;
    }
    /**
     * Adds the given project and all of its prerequisities, transitively,
     * to the provided set.