org.eclipse.core.internal.events
Class BuildManager

java.lang.Object
  extended by org.eclipse.core.internal.events.BuildManager
All Implemented Interfaces:
ILifecycleListener, ICoreConstants, IManager

public class BuildManager
extends java.lang.Object
implements ICoreConstants, IManager, ILifecycleListener


Field Summary
 
Fields inherited from interface org.eclipse.core.internal.resources.ICoreConstants
CRASH_DETECTED, EMPTY_FILE_STATES, EMPTY_PROJECT_ARRAY, EMPTY_RESOURCE_ARRAY, I_NULL_SYNC_INFO, K_BUILD_LIST, M_CHILDREN_UNKNOWN, M_CONTENT_CACHE, M_DEFAULT_CONTENT_DESCRIPTION, M_DERIVED, M_HIDDEN, M_LINK, M_LOCAL_EXISTS, M_MARKERS_SNAP_DIRTY, M_NO_CONTENT_DESCRIPTION, M_OPEN, M_PHANTOM, M_SYNCINFO_SNAP_DIRTY, M_TEAM_PRIVATE_MEMBER, M_TYPE, M_TYPE_START, M_USED, MINIMUM_FILE_SEGMENT_LENGTH, MINIMUM_FOLDER_SEGMENT_LENGTH, NULL_FLAG, PREF_VERSION, PREF_VERSION_KEY, PROJECT_SEGMENT_LENGTH, REFRESH_ON_STARTUP, WORKSPACE_TREE_VERSION_1, WORKSPACE_TREE_VERSION_2
 
Constructor Summary
BuildManager(Workspace workspace, org.eclipse.core.runtime.jobs.ILock workspaceLock)
           
 
Method Summary
 org.eclipse.core.runtime.IStatus build(int trigger, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs all builders on all projects.
 org.eclipse.core.runtime.IStatus build(IProject project, int trigger, java.lang.String builderName, java.util.Map args, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the builder with the given name on the given project.
 java.util.ArrayList createBuildersPersistentInfo(IProject project)
          Creates and returns an ArrayList of BuilderPersistentInfo.
 void endTopLevel(boolean needsBuild)
          The outermost workspace operation has finished.
 java.util.ArrayList getBuildersPersistentInfo(IProject project)
          Returns a list of BuilderPersistentInfo.
 org.eclipse.core.runtime.jobs.ISchedulingRule getRule(IProject project, int trigger, java.lang.String builderName, java.util.Map args)
          Returns the scheduling rule that is required for building the project.
 void handleEvent(LifecycleEvent event)
           
 void interrupt()
          Another thread is attempting to modify the workspace.
 boolean isAutobuildBuildPending()
          Returns whether an autobuild is pending (requested but not yet completed).
 void setBuildersPersistentInfo(IProject project, java.util.ArrayList list)
          Sets the builder infos for the given project.
 void shutdown(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void startup(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildManager

public BuildManager(Workspace workspace,
                    org.eclipse.core.runtime.jobs.ILock workspaceLock)
Method Detail

build

public org.eclipse.core.runtime.IStatus build(int trigger,
                                              org.eclipse.core.runtime.IProgressMonitor monitor)
Runs all builders on all projects.

Returns:
A status indicating if the build succeeded or failed

build

public org.eclipse.core.runtime.IStatus build(IProject project,
                                              int trigger,
                                              java.lang.String builderName,
                                              java.util.Map args,
                                              org.eclipse.core.runtime.IProgressMonitor monitor)
Runs the builder with the given name on the given project.

Returns:
A status indicating if the build succeeded or failed

createBuildersPersistentInfo

public java.util.ArrayList createBuildersPersistentInfo(IProject project)
                                                 throws org.eclipse.core.runtime.CoreException
Creates and returns an ArrayList of BuilderPersistentInfo. The list includes entries for all builders that are in the builder spec, and that have a last built state, even if they have not been instantiated this session.

Throws:
org.eclipse.core.runtime.CoreException

endTopLevel

public void endTopLevel(boolean needsBuild)
The outermost workspace operation has finished. Do an autobuild if necessary.


getBuildersPersistentInfo

public java.util.ArrayList getBuildersPersistentInfo(IProject project)
                                              throws org.eclipse.core.runtime.CoreException
Returns a list of BuilderPersistentInfo. The list includes entries for all builders that are in the builder spec, and that have a last built state but have not been instantiated this session.

Throws:
org.eclipse.core.runtime.CoreException

handleEvent

public void handleEvent(LifecycleEvent event)
Specified by:
handleEvent in interface ILifecycleListener

interrupt

public void interrupt()
Another thread is attempting to modify the workspace. Cancel the autobuild and wait until it completes.


isAutobuildBuildPending

public boolean isAutobuildBuildPending()
Returns whether an autobuild is pending (requested but not yet completed).


setBuildersPersistentInfo

public void setBuildersPersistentInfo(IProject project,
                                      java.util.ArrayList list)
Sets the builder infos for the given project. The builder infos are an ArrayList of BuilderPersistentInfo. The list includes entries for all builders that are in the builder spec, and that have a last built state, even if they have not been instantiated this session.


shutdown

public void shutdown(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
shutdown in interface IManager

startup

public void startup(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
startup in interface IManager

getRule

public org.eclipse.core.runtime.jobs.ISchedulingRule getRule(IProject project,
                                                             int trigger,
                                                             java.lang.String builderName,
                                                             java.util.Map args)
Returns the scheduling rule that is required for building the project.