public class DefaultResourceDescriptionManager extends java.lang.Object implements IResourceDescription.Manager
IResourceDescription.Manager
. Customize by binding another
IDefaultResourceDescriptionStrategy
.IResourceDescription.Manager.AllChangeAware
Constructor and Description |
---|
DefaultResourceDescriptionManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
addExportedNames(java.util.Set<QualifiedName> names,
IResourceDescription resourceDescriptor) |
IResourceDescription.Delta |
createDelta(IResourceDescription oldDescription,
IResourceDescription newDescription) |
IResourceScopeCache |
getCache() |
IContainer.Manager |
getContainerManager() |
DescriptionUtils |
getDescriptionUtils() |
protected java.util.Collection<QualifiedName> |
getImportedNames(IResourceDescription candidate) |
IResourceDescription |
getResourceDescription(org.eclipse.emf.ecore.resource.Resource resource) |
protected boolean |
hasChanges(IResourceDescription.Delta delta,
IResourceDescription candidate)
Whether the given delta is considered to have changed from the candidate's perspective.
|
protected IResourceDescription |
internalGetResourceDescription(org.eclipse.emf.ecore.resource.Resource resource,
IDefaultResourceDescriptionStrategy strategy) |
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.
|
protected boolean |
isAffected(java.util.Collection<QualifiedName> importedNames,
IResourceDescription description) |
boolean |
isAffected(IResourceDescription.Delta delta,
IResourceDescription candidate) |
void |
setCache(IResourceScopeCache cache) |
void |
setContainerManager(IContainer.Manager containerManager) |
void |
setDescriptionUtils(DescriptionUtils descriptionUtils) |
void |
setStrategy(IDefaultResourceDescriptionStrategy strategy) |
public IResourceDescription getResourceDescription(org.eclipse.emf.ecore.resource.Resource resource)
getResourceDescription
in interface IResourceDescription.Manager
public IResourceDescription.Delta createDelta(IResourceDescription oldDescription, IResourceDescription newDescription)
createDelta
in interface IResourceDescription.Manager
protected IResourceDescription internalGetResourceDescription(org.eclipse.emf.ecore.resource.Resource resource, IDefaultResourceDescriptionStrategy strategy)
public IContainer.Manager getContainerManager()
public void setContainerManager(IContainer.Manager containerManager)
public void setCache(IResourceScopeCache cache)
public IResourceScopeCache getCache()
public boolean isAffected(IResourceDescription.Delta delta, IResourceDescription candidate) throws java.lang.IllegalArgumentException
isAffected
in interface IResourceDescription.Manager
java.lang.IllegalArgumentException
- if this manager is not responsible for the given candidate.protected java.util.Collection<QualifiedName> getImportedNames(IResourceDescription candidate)
protected void addExportedNames(java.util.Set<QualifiedName> names, IResourceDescription resourceDescriptor)
public boolean isAffected(java.util.Collection<IResourceDescription.Delta> deltas, IResourceDescription candidate, IResourceDescriptions context)
IResourceDescription.Manager
false
whenever
possible, e.g. check the deltas against the visible containers.isAffected
in interface IResourceDescription.Manager
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
.protected boolean hasChanges(IResourceDescription.Delta delta, IResourceDescription candidate)
Delta#haveEObjectDescriptionsChanged()
.
But in some cases even "internal" changes (that are not visible in the EObjectDescriptions) could be interesting.protected boolean isAffected(java.util.Collection<QualifiedName> importedNames, IResourceDescription description)
public DescriptionUtils getDescriptionUtils()
public void setDescriptionUtils(DescriptionUtils descriptionUtils)
public void setStrategy(IDefaultResourceDescriptionStrategy strategy)