Bug 77871 [GlobalActions] (Re)Build Project should track resources itself
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildCleanAction.java
* IBM - Initial API and implementation
 **********************************************************************/
package org.eclipse.ui.internal.ide.actions;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.ide.dialogs.CleanDialog;
/**
 * The clean action replaces the rebuild actions. Clean will discard all built
 * state for all projects in the workspace, and deletes all problem markers.
 * The next time a build is run, projects will have to be built from scratch.
 * Technically this is only necessary if an incremental builder misbehaves.
 * 
 * @since 3.0
 */
public class BuildCleanAction extends Action implements
        ActionFactory.IWorkbenchAction {
    private IWorkbenchWindow window;
    public BuildCleanAction(IWorkbenchWindow window) {
        super(IDEWorkbenchMessages.getString("Workbench.buildClean")); 
        setActionDefinitionId("org.eclipse.ui.project.cleanAction"); 
        this.window = window;