Class LightClusteringBuilderState
- java.lang.Object
- 
- org.eclipse.xtext.resource.impl.AbstractResourceDescriptionChangeEventSource
- 
- org.eclipse.xtext.builder.builderState.AbstractBuilderState
- 
- org.eclipse.xtext.builder.clustering.ClusteringBuilderState
- 
- com._1c.g5.modeling.xtext.builder.LightClusteringBuilderState
 
 
 
 
- 
- All Implemented Interfaces:
- IBuilderStateResourceManagement,- org.eclipse.xtext.builder.builderState.IBuilderState,- org.eclipse.xtext.resource.IResourceDescription.Event.Source,- org.eclipse.xtext.resource.IResourceDescriptions,- org.eclipse.xtext.resource.ISelectable
 
 public class LightClusteringBuilderState extends org.eclipse.xtext.builder.clustering.ClusteringBuilderState implements IBuilderStateResourceManagement Lightweight implementation of theClusteringBuilderStateclass.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classLightClusteringBuilderState.BuilderForkJoinWorkerThreadSpecial threads for building EDT files
 - 
Field SummaryFields Modifier and Type Field Description static StringBUILDING_OPERATION_OPTIONSpecial load option key forResourceSet(seeResourceSet.getLoadOptions()) markResourceSetas created in building operation
 - 
Constructor SummaryConstructors Constructor Description LightClusteringBuilderState()Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.emf.ecore.resource.ResourceaddResource(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)protected voidcollectRoughBuildScope(org.eclipse.core.resources.IProject project, org.eclipse.xtext.resource.impl.ResourceDescriptionsData newData, Set<org.eclipse.emf.common.util.URI> result)Collects rough build scope.protected Collection<org.eclipse.xtext.resource.IResourceDescription.Delta>doUpdate(org.eclipse.xtext.builder.impl.BuildData buildData, org.eclipse.xtext.resource.impl.ResourceDescriptionsData newData, org.eclipse.core.runtime.IProgressMonitor monitor)We should override this method for adding logic for clearing resources dataprotected voidensureLoaded()voidfillResourceSetOptions(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)FillResourceSetload options withBUILDING_OPERATION_OPTIONExecutorServicegetExecutorService(int processors)GetsExecutorServicefor paralleling operation.intgetPermittedThreads()Gets number of permitted threads for buildprotected voidinstallSourceLevelURIs(org.eclipse.xtext.builder.impl.BuildData buildData)voidload()voidsetPermittedThreads(int permittedThreads)Sets number of permitted threads for buildprotected Queue<org.eclipse.xtext.resource.IResourceDescription.Delta>updateNewResourceDescriptions(Queue<org.eclipse.emf.common.util.URI> allUris, int queueFullSize, org.eclipse.core.resources.IProject currentProject, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Set<org.eclipse.emf.common.util.URI> toBeDeleted, boolean isIndexingOnly, AtomicInteger[] indexes, org.eclipse.xtext.builder.clustering.CurrentDescriptions newState, org.eclipse.core.runtime.SubMonitor subProgress)protected Queue<org.eclipse.xtext.resource.IResourceDescription.Delta>updateNewResourceDescriptionsForQueue(Queue<org.eclipse.emf.common.util.URI> queue, int fullQueueSize, org.eclipse.core.resources.IProject currentProject, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Set<org.eclipse.emf.common.util.URI> toBeDeleted, boolean isIndexingOnly, AtomicInteger[] indexes, org.eclipse.xtext.builder.clustering.CurrentDescriptions newState, org.eclipse.core.runtime.SubMonitor subProgress)protected voidwriteNewResourceDescriptions(org.eclipse.xtext.builder.impl.BuildData buildData, org.eclipse.xtext.resource.IResourceDescriptions oldState, org.eclipse.xtext.builder.clustering.CurrentDescriptions newState, org.eclipse.core.runtime.IProgressMonitor monitor)We should override this method for additional processing of the resources.- 
Methods inherited from class org.eclipse.xtext.builder.clustering.ClusteringBuilderStateclearResourceSet, getBuiltProject, getResourceDescriptionManager, queueAffectedResources
 - 
Methods inherited from class org.eclipse.xtext.builder.builderState.AbstractBuilderStateclean, doClean, ensureNotNull, getAllResourceDescriptions, getCopiedResourceDescriptionsData, getExportedObjects, getExportedObjects, getExportedObjectsByObject, getExportedObjectsByType, getResourceDescription, isEmpty, setPersister, setResourceDescriptionsData, update, updateMarkers
 - 
Methods inherited from class org.eclipse.xtext.resource.impl.AbstractResourceDescriptionChangeEventSourceaddListener, addListeners, notifyListeners, removeListener, removeListeners
 
- 
 
- 
- 
- 
Field Detail- 
BUILDING_OPERATION_OPTIONpublic static final String BUILDING_OPERATION_OPTION Special load option key forResourceSet(seeResourceSet.getLoadOptions()) markResourceSetas created in building operation- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
loadpublic void load() - Overrides:
- loadin class- org.eclipse.xtext.builder.builderState.AbstractBuilderState
 
 - 
getPermittedThreadspublic int getPermittedThreads() Description copied from interface:IBuilderStateResourceManagementGets number of permitted threads for build- Specified by:
- getPermittedThreadsin interface- IBuilderStateResourceManagement
- Returns:
- number of permitted threads for build
 
 - 
setPermittedThreadspublic void setPermittedThreads(int permittedThreads) Description copied from interface:IBuilderStateResourceManagementSets number of permitted threads for build- Specified by:
- setPermittedThreadsin interface- IBuilderStateResourceManagement
- Parameters:
- permittedThreads- number of permitted threads for build
 
 - 
fillResourceSetOptionspublic void fillResourceSetOptions(org.eclipse.emf.ecore.resource.ResourceSet resourceSet) FillResourceSetload options withBUILDING_OPERATION_OPTION- Parameters:
- resourceSet- filling- ResourceSet,cannot be- null
 
 - 
getExecutorServicepublic ExecutorService getExecutorService(int processors) GetsExecutorServicefor paralleling operation. CreatingThreadwill have name "LCBuilderState" with index adding- Parameters:
- processors- number of allowed independent- Threads
- Returns:
- ExecutorServicefor paralleling operation, cannot be- null
 
 - 
ensureLoadedprotected void ensureLoaded() - Overrides:
- ensureLoadedin class- org.eclipse.xtext.builder.builderState.AbstractBuilderState
 
 - 
installSourceLevelURIsprotected void installSourceLevelURIs(org.eclipse.xtext.builder.impl.BuildData buildData) - Overrides:
- installSourceLevelURIsin class- org.eclipse.xtext.builder.clustering.ClusteringBuilderState
 
 - 
addResourceprotected org.eclipse.emf.ecore.resource.Resource addResource(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)- Overrides:
- addResourcein class- org.eclipse.xtext.builder.clustering.ClusteringBuilderState
 
 - 
doUpdateprotected Collection<org.eclipse.xtext.resource.IResourceDescription.Delta> doUpdate(org.eclipse.xtext.builder.impl.BuildData buildData, org.eclipse.xtext.resource.impl.ResourceDescriptionsData newData, org.eclipse.core.runtime.IProgressMonitor monitor) We should override this method for adding logic for clearing resources data- Overrides:
- doUpdatein class- org.eclipse.xtext.builder.clustering.ClusteringBuilderState
 
 - 
collectRoughBuildScopeprotected void collectRoughBuildScope(org.eclipse.core.resources.IProject project, org.eclipse.xtext.resource.impl.ResourceDescriptionsData newData, Set<org.eclipse.emf.common.util.URI> result)Collects rough build scope. Rough means that it may contain URIs of the resources that do not require building.- Parameters:
- project- The project that is being built. May be- null.
- newData- The new resource descriptions. May not be- null.
- result- The result set the URIs will be added to. May not be- null.
 
 - 
updateNewResourceDescriptionsprotected Queue<org.eclipse.xtext.resource.IResourceDescription.Delta> updateNewResourceDescriptions(Queue<org.eclipse.emf.common.util.URI> allUris, int queueFullSize, org.eclipse.core.resources.IProject currentProject, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Set<org.eclipse.emf.common.util.URI> toBeDeleted, boolean isIndexingOnly, AtomicInteger[] indexes, org.eclipse.xtext.builder.clustering.CurrentDescriptions newState, org.eclipse.core.runtime.SubMonitor subProgress) UpdatesIResourceDescriptionfor concreteQueueofURIs. CreatesIResourceDescription.Deltawith information ofIResourceDescriptionupdating. This method contains logic for paralleling updating operation forgetPermittedThreads()threads- Parameters:
- allUris- all- URIs for update- IResourceDescription, cannot be- null
- queueFullSize- initial size of the- Queueof- URIs for updating, need for right update of- SubMonitor
- currentProject- actual project for updating- IResourceDescription, cannot be- null
- resourceSet- actual- ResourceSetfor creating- Resources, cannot be- null
- toBeDeleted- set of the- URIs which were deleted from project, cannot be- null
- isIndexingOnly-- trueif creating- Resources should be create for only index operation
- indexes- special indexes distributed from all threads of updating- IResourceDescription.- indexes[0] number of IResourceDescriptionupdating in this build
- indexes[1] number of IResourceDescriptionupdating in this step
- indexes[2] number of threads updating IResourceDescription
 
- indexes[0] number of 
- newState-- CurrentDescriptionsfor getting- IResourceDescriptionby- URI, cannot be- null
- subProgress-- SubMonitorfor show progress of operation, cannot be- null
- Returns:
- IResourceDescription.Deltawith information of- IResourceDescriptionupdating, never- null
 
 - 
updateNewResourceDescriptionsForQueueprotected Queue<org.eclipse.xtext.resource.IResourceDescription.Delta> updateNewResourceDescriptionsForQueue(Queue<org.eclipse.emf.common.util.URI> queue, int fullQueueSize, org.eclipse.core.resources.IProject currentProject, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Set<org.eclipse.emf.common.util.URI> toBeDeleted, boolean isIndexingOnly, AtomicInteger[] indexes, org.eclipse.xtext.builder.clustering.CurrentDescriptions newState, org.eclipse.core.runtime.SubMonitor subProgress) UpdatesIResourceDescriptionfor concreteQueueofURIs. CreatesIResourceDescription.Deltawith information ofIResourceDescriptionupdating.- Parameters:
- queue- all- URIs for update- IResourceDescription, cannot be- null
- fullQueueSize- initial size of the- Queueof- URIs for updating, need for right update of- SubMonitor
- currentProject- actual project for updating- IResourceDescription, cannot be- null
- resourceSet- actual- ResourceSetfor creating- Resources, cannot be- null
- toBeDeleted- set of the- URIs which were deleted from project, cannot be- null
- isIndexingOnly-- trueif creating- Resources should be create for only index operation
- indexes- special indexes distributed from all threads of updating- IResourceDescription.- indexes[0] number of IResourceDescriptionupdating in this build
- indexes[1] number of IResourceDescriptionupdating in this step
- indexes[2] number of threads updating IResourceDescription
 
- indexes[0] number of 
- newState-- CurrentDescriptionsfor getting- IResourceDescriptionby- URI, cannot be- null
- subProgress-- SubMonitorfor show progress of operation, cannot be- null
- Returns:
- IResourceDescription.Deltawith information of- IResourceDescriptionupdating, never- null
 
 - 
writeNewResourceDescriptionsprotected void writeNewResourceDescriptions(org.eclipse.xtext.builder.impl.BuildData buildData, org.eclipse.xtext.resource.IResourceDescriptions oldState, org.eclipse.xtext.builder.clustering.CurrentDescriptions newState, org.eclipse.core.runtime.IProgressMonitor monitor)We should override this method for additional processing of the resources. SeeILightClusteringBuilderStateCallbackService- Overrides:
- writeNewResourceDescriptionsin class- org.eclipse.xtext.builder.clustering.ClusteringBuilderState
 
 
- 
 
-