org.eclipse.xtext.builder.impl
Class BuildContext

java.lang.Object
  extended by org.eclipse.xtext.builder.impl.BuildContext
All Implemented Interfaces:
IXtextBuilderParticipant.IBuildContext

public class BuildContext
extends java.lang.Object
implements IXtextBuilderParticipant.IBuildContext


Constructor Summary
BuildContext(XtextBuilder builder, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.util.List<IResourceDescription.Delta> deltas, IXtextBuilderParticipant.BuildType type)
           
 
Method Summary
 IXtextBuilderParticipant.BuildType getBuildType()
          The current build type.
 org.eclipse.core.resources.IProject getBuiltProject()
          Returns the current project.
 java.util.List<IResourceDescription.Delta> getDeltas()
          Returns the list of resource deltas that was produced by this run of the incremental project builder.
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
          The correctly configured resource set for this run of the incremental project builder.
 void needRebuild()
          Request a rebuild after the this build run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildContext

public BuildContext(XtextBuilder builder,
                    org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
                    java.util.List<IResourceDescription.Delta> deltas,
                    IXtextBuilderParticipant.BuildType type)
Method Detail

getBuiltProject

public org.eclipse.core.resources.IProject getBuiltProject()
Description copied from interface: IXtextBuilderParticipant.IBuildContext
Returns the current project.

Specified by:
getBuiltProject in interface IXtextBuilderParticipant.IBuildContext
Returns:
the currently built project. Never null.

getDeltas

public java.util.List<IResourceDescription.Delta> getDeltas()
Description copied from interface: IXtextBuilderParticipant.IBuildContext
Returns the list of resource deltas that was produced by this run of the incremental project builder. This list is the only safe way to obtain resources that were processed by this build run. These resources may be requested from the resource set by means of getResource.

Specified by:
getDeltas in interface IXtextBuilderParticipant.IBuildContext
Returns:
the list of deltas. Never null.

getResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Description copied from interface: IXtextBuilderParticipant.IBuildContext
The correctly configured resource set for this run of the incremental project builder. Clients should not assume that the list of resources in the resource set contains anything. However, they are free to dynamically load and unload resources from the resource set. Other changes should be avoided.

Specified by:
getResourceSet in interface IXtextBuilderParticipant.IBuildContext
Returns:
the configured resource set. Never null.

needRebuild

public void needRebuild()
Description copied from interface: IXtextBuilderParticipant.IBuildContext
Request a rebuild after the this build run. It is necessary to call IXtextBuilderParticipant.IBuildContext.needRebuild() if this participant generates file that need to be compiled or processed by another builder.

Specified by:
needRebuild in interface IXtextBuilderParticipant.IBuildContext

getBuildType

public IXtextBuilderParticipant.BuildType getBuildType()
Description copied from interface: IXtextBuilderParticipant.IBuildContext
The current build type.

Specified by:
getBuildType in interface IXtextBuilderParticipant.IBuildContext
Returns:
the current build type.