org.eclipse.xtext.builder.clustering
Class ClusteringBuilderState
java.lang.Object
org.eclipse.xtext.resource.impl.AbstractResourceDescriptionChangeEventSource
org.eclipse.xtext.builder.builderState.AbstractBuilderState
org.eclipse.xtext.builder.clustering.ClusteringBuilderState
- All Implemented Interfaces:
- IBuilderState, IResourceDescription.Event.Source, IResourceDescriptions, ISelectable
public class ClusteringBuilderState
- extends AbstractBuilderState
- Author:
- Sebastian Zarnekow - Initial contribution and API, Thomas Wolf - Refactored the build phases and documentation, Lieven Lemiengre - Parallel resource loading
Method Summary |
protected org.eclipse.emf.ecore.resource.Resource |
addResource(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Adds a resource to the ResourceSet if the ResourceSet doesn't contain it yet. |
protected void |
clearResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Clears the content of the resource set without sending notifications. |
protected java.util.Collection<IResourceDescription.Delta> |
doUpdate(BuildData buildData,
ResourceDescriptionsData newData,
org.eclipse.core.runtime.IProgressMonitor monitor)
Actually do the build. |
protected org.eclipse.core.resources.IProject |
getBuiltProject(BuildData buildData)
|
protected IResourceDescription.Manager |
getResourceDescriptionManager(org.eclipse.emf.common.util.URI uri)
|
protected void |
queueAffectedResources(java.util.Set<org.eclipse.emf.common.util.URI> allRemainingURIs,
IResourceDescriptions oldState,
CurrentDescriptions newState,
java.util.Collection<IResourceDescription.Delta> deltas,
BuildData buildData,
org.eclipse.core.runtime.IProgressMonitor monitor)
Put all resources that depend on some changes onto the queue of resources to be processed. |
protected void |
writeNewResourceDescriptions(BuildData buildData,
IResourceDescriptions oldState,
CurrentDescriptions newState,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create new resource descriptions for a set of resources given by their URIs. |
Methods inherited from class org.eclipse.xtext.builder.builderState.AbstractBuilderState |
clean, doClean, ensureLoaded, ensureNotNull, getAllResourceDescriptions, getCopiedResourceDescriptionsData, getExportedObjects, getExportedObjects, getExportedObjectsByObject, getExportedObjectsByType, getResourceDescription, isEmpty, load, setPersister, setResourceDescriptionsData, update, updateMarkers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCELOADER_CROSS_LINKING
public static final java.lang.String RESOURCELOADER_CROSS_LINKING
- See Also:
- Constant Field Values
RESOURCELOADER_GLOBAL_INDEX
public static final java.lang.String RESOURCELOADER_GLOBAL_INDEX
- See Also:
- Constant Field Values
ClusteringBuilderState
public ClusteringBuilderState()
doUpdate
protected java.util.Collection<IResourceDescription.Delta> doUpdate(BuildData buildData,
ResourceDescriptionsData newData,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Actually do the build.
- Specified by:
doUpdate
in class AbstractBuilderState
- Parameters:
buildData
- the data that should be considered for the updatenewData
- the new resource descriptions as they are to be persisted (the new index after the build).
Initially contains the old resource descriptions.monitor
- The progress monitor
- Returns:
- A list of deltas describing all changes made by the build.
writeNewResourceDescriptions
protected void writeNewResourceDescriptions(BuildData buildData,
IResourceDescriptions oldState,
CurrentDescriptions newState,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Create new resource descriptions for a set of resources given by their URIs.
- Parameters:
buildData
- The underlying data for the write operation.oldState
- The old indexnewState
- The new indexmonitor
- The progress monitor used for user feedback
getBuiltProject
protected org.eclipse.core.resources.IProject getBuiltProject(BuildData buildData)
clearResourceSet
protected void clearResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
- Clears the content of the resource set without sending notifications.
This avoids unnecessary, explicit unloads.
addResource
protected org.eclipse.emf.ecore.resource.Resource addResource(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
- Adds a resource to the ResourceSet if the ResourceSet doesn't contain it yet.
- Parameters:
resource
- the resourceresourceSet
- the resource set
- Returns:
- the resource
queueAffectedResources
protected void queueAffectedResources(java.util.Set<org.eclipse.emf.common.util.URI> allRemainingURIs,
IResourceDescriptions oldState,
CurrentDescriptions newState,
java.util.Collection<IResourceDescription.Delta> deltas,
BuildData buildData,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Put all resources that depend on some changes onto the queue of resources to be processed.
Updates notInDelta by removing all URIs put into the queue.
- Parameters:
allRemainingURIs
- URIs that were not considered by prior operations.oldState
- State before the buildnewState
- The current statedeltas
- The changesbuildData
- the underlying data for this build run.monitor
- The progress monitor used for user feedback
getResourceDescriptionManager
protected IResourceDescription.Manager getResourceDescriptionManager(org.eclipse.emf.common.util.URI uri)