Package org.eclipse.xtext.resource
Interface IResourceDescription.Manager
-
- All Known Subinterfaces:
IResourceDescription.Manager.AllChangeAware
- All Known Implementing Classes:
DefaultResourceDescriptionManager
,DerivedStateAwareResourceDescriptionManager
,GenericResourceDescriptionManager
,StorageAwareResourceDescriptionManager
- Enclosing interface:
- IResourceDescription
public static interface IResourceDescription.Manager
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IResourceDescription.Manager.AllChangeAware
Implement this interface if your language should be notified of allIResourceDescription.Delta
s, even if they don't contain any changedEObjectDescription
s
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IResourceDescription.Delta
createDelta(IResourceDescription oldDescription, IResourceDescription newDescription)
IResourceDescription
getResourceDescription(org.eclipse.emf.ecore.resource.Resource resource)
boolean
isAffected(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.boolean
isAffected(IResourceDescription.Delta delta, IResourceDescription candidate)
-
-
-
Method Detail
-
getResourceDescription
IResourceDescription getResourceDescription(org.eclipse.emf.ecore.resource.Resource resource)
- Returns:
- a resource description for the given resource. The result represents the current state of the given resource.
-
createDelta
IResourceDescription.Delta createDelta(IResourceDescription oldDescription, IResourceDescription newDescription)
- Returns:
- a delta for both given descriptions.
-
isAffected
boolean isAffected(IResourceDescription.Delta delta, IResourceDescription candidate) throws java.lang.IllegalArgumentException
- 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
boolean isAffected(java.util.Collection<IResourceDescription.Delta> deltas, IResourceDescription candidate, IResourceDescriptions context) throws java.lang.IllegalArgumentException
Batch operation to check whether a description is affected by any given delta in the given context. Implementations may perform any optimizations to returnfalse
whenever possible, e.g. check the deltas against the visible containers.- 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.
-
-