Class GenericResourceDescriptionManager
- java.lang.Object
-
- org.eclipse.xtext.resource.generic.GenericResourceDescriptionManager
-
- All Implemented Interfaces:
IResourceDescription.Manager
public class GenericResourceDescriptionManager extends java.lang.Object implements IResourceDescription.Manager
AnIResourceDescription.Managerfor non-Xtext resources.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.resource.IResourceDescription.Manager
IResourceDescription.Manager.AllChangeAware
-
-
Constructor Summary
Constructors Constructor Description GenericResourceDescriptionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IResourceDescription.DeltacreateDelta(IResourceDescription oldDescription, IResourceDescription newDescription)IResourceDescriptiongetResourceDescription(org.eclipse.emf.ecore.resource.Resource resource)booleanisAffected(java.util.Collection<IResourceDescription.Delta> deltas, IResourceDescription candidate, IResourceDescriptions context)Batch operation to check whether a description is affected by any given delta in the given context.booleanisAffected(IResourceDescription.Delta delta, IResourceDescription candidate)
-
-
-
Method Detail
-
getResourceDescription
public IResourceDescription getResourceDescription(org.eclipse.emf.ecore.resource.Resource resource)
- Specified by:
getResourceDescriptionin interfaceIResourceDescription.Manager- Returns:
- a resource description for the given resource. The result represents the current state of the given resource.
-
createDelta
public IResourceDescription.Delta createDelta(IResourceDescription oldDescription, IResourceDescription newDescription)
- Specified by:
createDeltain interfaceIResourceDescription.Manager- Returns:
- a delta for both given descriptions.
-
isAffected
public boolean isAffected(IResourceDescription.Delta delta, IResourceDescription candidate) throws java.lang.IllegalArgumentException
- Specified by:
isAffectedin interfaceIResourceDescription.Manager- Returns:
- whether the candidate is affected by the change in the delta.
- Throws:
java.lang.IllegalArgumentException- if this manager is not responsible for the given candidate.
-
isAffected
public boolean isAffected(java.util.Collection<IResourceDescription.Delta> deltas, IResourceDescription candidate, IResourceDescriptions context) throws java.lang.IllegalArgumentException
Description copied from interface:IResourceDescription.ManagerBatch operation to check whether a description is affected by any given delta in the given context. Implementations may perform any optimizations to returnfalsewhenever possible, e.g. check the deltas against the visible containers.- Specified by:
isAffectedin interfaceIResourceDescription.Manager- Parameters:
deltas- List of deltas to check. May not benull.candidate- The description to check. May not benull.context- The current context of the batch operation. May not benull.- Returns:
- whether the candidate is affected by any of the given changes.
- Throws:
java.lang.IllegalArgumentException- if this manager is not responsible for the given candidate.
-
-