org.eclipse.xtext.resource
Interface IResourceDescription.Manager

All Known Implementing Classes:
DefaultResourceDescriptionManager, GenericResourceDescriptionManager
Enclosing interface:
IResourceDescription

public static interface IResourceDescription.Manager


Method Summary
 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 return false whenever possible, e.g. check the deltas against the visible containers.

Parameters:
deltas - List of deltas to check. May not be null.
candidate - The description to check. May not be null.
context - The current context of the batch operation. May not be null.
Returns:
whether the condidate is affected by any of the given changes.
Throws:
java.lang.IllegalArgumentException - if this manager is not responsible for the given candidate.