public abstract class AbstractBuilderState extends AbstractResourceDescriptionChangeEventSource implements IBuilderState
IResourceDescriptions.IContextAware, IResourceDescriptions.NullImpl
Constructor and Description |
---|
AbstractBuilderState() |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<IResourceDescription.Delta> |
clean(java.util.Set<org.eclipse.emf.common.util.URI> toBeRemoved,
org.eclipse.core.runtime.IProgressMonitor monitor)
Remove the descriptions for the given resource-uris from the
IResourceDescriptions . |
protected java.util.Collection<IResourceDescription.Delta> |
doClean(java.util.Set<org.eclipse.emf.common.util.URI> toBeRemoved,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected abstract java.util.Collection<IResourceDescription.Delta> |
doUpdate(BuildData buildData,
ResourceDescriptionsData newData,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected void |
ensureLoaded() |
protected java.util.Set<org.eclipse.emf.common.util.URI> |
ensureNotNull(java.util.Set<org.eclipse.emf.common.util.URI> uris) |
java.lang.Iterable<IResourceDescription> |
getAllResourceDescriptions() |
protected ResourceDescriptionsData |
getCopiedResourceDescriptionsData() |
java.lang.Iterable<IEObjectDescription> |
getExportedObjects() |
java.lang.Iterable<IEObjectDescription> |
getExportedObjects(org.eclipse.emf.ecore.EClass type,
QualifiedName name,
boolean ignoreCase) |
java.lang.Iterable<IEObjectDescription> |
getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object) |
java.lang.Iterable<IEObjectDescription> |
getExportedObjectsByType(org.eclipse.emf.ecore.EClass type) |
IResourceDescription |
getResourceDescription(org.eclipse.emf.common.util.URI uri)
Returns the resource descriptions for the given URI.
|
boolean |
isEmpty()
Clients may want to check the selectable to skip its processing in case it is empty.
|
void |
load() |
void |
setPersister(PersistedStateProvider persister) |
protected void |
setResourceDescriptionsData(ResourceDescriptionsData newData) |
com.google.common.collect.ImmutableList<IResourceDescription.Delta> |
update(BuildData buildData,
org.eclipse.core.runtime.IProgressMonitor monitor)
Updated the underlying
IResourceDescriptions according to the passed URIs. |
protected void |
updateMarkers(IResourceDescription.Delta delta,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.core.runtime.IProgressMonitor monitor) |
addListener, addListeners, notifyListeners, removeListener, removeListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, notifyListeners, removeListener
public void load()
protected void ensureLoaded()
protected java.util.Set<org.eclipse.emf.common.util.URI> ensureNotNull(java.util.Set<org.eclipse.emf.common.util.URI> uris)
protected void setResourceDescriptionsData(ResourceDescriptionsData newData)
protected void updateMarkers(IResourceDescription.Delta delta, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.OperationCanceledException
org.eclipse.core.runtime.OperationCanceledException
protected ResourceDescriptionsData getCopiedResourceDescriptionsData()
public java.lang.Iterable<IResourceDescription> getAllResourceDescriptions()
getAllResourceDescriptions
in interface IResourceDescriptions
public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
IResourceDescriptions
getResourceDescription
in interface IResourceDescriptions
public void setPersister(PersistedStateProvider persister)
public com.google.common.collect.ImmutableList<IResourceDescription.Delta> update(BuildData buildData, org.eclipse.core.runtime.IProgressMonitor monitor)
IBuilderState
IResourceDescriptions
according to the passed URIs.
It updates transitively affected IResourceDescription
as well.
The change to the underlying IResourceDescriptions
is guaranteed to be atomic.update
in interface IBuilderState
buildData
- the underlying data for the update.monitor
- the progress monitor to use for reporting progress to the user. It is the caller's responsibility
to call done() on the given monitor. Accepts null, indicating that no progress should be
reported and that the operation cannot be canceled.protected abstract java.util.Collection<IResourceDescription.Delta> doUpdate(BuildData buildData, ResourceDescriptionsData newData, org.eclipse.core.runtime.IProgressMonitor monitor)
public com.google.common.collect.ImmutableList<IResourceDescription.Delta> clean(java.util.Set<org.eclipse.emf.common.util.URI> toBeRemoved, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.OperationCanceledException
IBuilderState
IResourceDescriptions
.
The clean-operation is not transitive.
The change to the underlying IResourceDescriptions
is guaranteed to be atomic.clean
in interface IBuilderState
toBeRemoved
- the uris or the cleaned resources.monitor
- the progress monitor to use for reporting progress to the user. It is the caller's responsibility
to call done() on the given monitor. Accepts null, indicating that no progress should be
reported and that the operation cannot be canceled.org.eclipse.core.runtime.OperationCanceledException
protected java.util.Collection<IResourceDescription.Delta> doClean(java.util.Set<org.eclipse.emf.common.util.URI> toBeRemoved, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.OperationCanceledException
org.eclipse.core.runtime.OperationCanceledException
public java.lang.Iterable<IEObjectDescription> getExportedObjects()
getExportedObjects
in interface ISelectable
null
.public java.lang.Iterable<IEObjectDescription> getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName name, boolean ignoreCase)
getExportedObjects
in interface ISelectable
null
.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
getExportedObjectsByType
in interface ISelectable
null
.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
getExportedObjectsByObject
in interface ISelectable
null
.public boolean isEmpty()
ISelectable
false
if it is too expensive to compute the actual result.isEmpty
in interface ISelectable
true
if the selectable does not provide any descriptions.