public class DirtyStateManager extends AbstractResourceDescriptionChangeEventSource implements IDirtyStateManager
IDirtyStateManager.Event| Constructor and Description |
|---|
DirtyStateManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
announceDirtyStateChanged(IDirtyResource dirtyResource)
Announce the dirty state of the given resource.
|
void |
discardDirtyState(IDirtyResource dirtyResource)
Mark the given dirty resource as unmanaged.
|
protected IDirtyResource |
findDirtyResourcebyURIorNormalizedURI(org.eclipse.emf.common.util.URI uri) |
IExternalContentSupport.IExternalContentProvider |
getActualContentProvider()
Some use cases may require the latest and most up to date content - mostly in a secured, transactional
context such as a rename refactoring.
|
java.lang.String |
getContent(org.eclipse.emf.common.util.URI uri)
Get the content that will shadow the persistent state.
|
IDirtyResource |
getDirtyResource(org.eclipse.emf.common.util.URI uri) |
IResourceDescription |
getDirtyResourceDescription(org.eclipse.emf.common.util.URI uri) |
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) |
boolean |
hasContent(org.eclipse.emf.common.util.URI uri) |
boolean |
isEmpty()
Clients may want to check the selectable to skip its processing in case it is empty.
|
boolean |
manageDirtyState(IDirtyResource dirtyResource)
Initially try to manage the given resource and its dirty state.
|
protected void |
notifyListeners(IDirtyResource dirtyResource,
boolean managed) |
addListener, addListeners, notifyListeners, removeListener, removeListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, notifyListeners, removeListenerpublic void announceDirtyStateChanged(IDirtyResource dirtyResource)
IDirtyStateManagerannounceDirtyStateChanged in interface IDirtyStateManagerpublic void discardDirtyState(IDirtyResource dirtyResource)
IDirtyStateManagerURI will not become unmanaged. A call to this method will raise an event.discardDirtyState in interface IDirtyStateManagerIDirtyStateManager.announceDirtyStateChanged(IDirtyResource)protected void notifyListeners(IDirtyResource dirtyResource, boolean managed)
public boolean manageDirtyState(IDirtyResource dirtyResource)
IDirtyStateManagerTrue will be returned, if the resource with the given URI
was not managed before. However clients are free to call
IDirtyStateManager.announceDirtyStateChanged(IDirtyResource) even if false was
returned. A call to IDirtyStateManager.manageDirtyState(IDirtyResource) does not raise any events.manageDirtyState in interface IDirtyStateManagertrue if this resource is the first one that has been registered
for its URIpublic IDirtyResource getDirtyResource(org.eclipse.emf.common.util.URI uri)
public IResourceDescription getDirtyResourceDescription(org.eclipse.emf.common.util.URI uri)
getDirtyResourceDescription in interface IDirtyStateManagerpublic java.lang.String getContent(org.eclipse.emf.common.util.URI uri)
IExternalContentSupport.IExternalContentProvidergetContent in interface IExternalContentSupport.IExternalContentProviderprotected IDirtyResource findDirtyResourcebyURIorNormalizedURI(org.eclipse.emf.common.util.URI uri)
public IExternalContentSupport.IExternalContentProvider getActualContentProvider()
IExternalContentSupport.IExternalContentProvidergetActualContentProvider in interface IExternalContentSupport.IExternalContentProviderpublic boolean hasContent(org.eclipse.emf.common.util.URI uri)
hasContent in interface IExternalContentSupport.IExternalContentProvidertrue if and only if external content should be used instead of the persistent one.public boolean isEmpty()
ISelectablefalse if it is too expensive to compute the actual result.isEmpty in interface ISelectabletrue if the selectable does not provide any descriptions.public java.lang.Iterable<IEObjectDescription> getExportedObjects()
getExportedObjects in interface ISelectablenull.public java.lang.Iterable<IEObjectDescription> getExportedObjects(org.eclipse.emf.ecore.EClass type, QualifiedName name, boolean ignoreCase)
getExportedObjects in interface ISelectablenull.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
getExportedObjectsByObject in interface ISelectablenull.public java.lang.Iterable<IEObjectDescription> getExportedObjectsByType(org.eclipse.emf.ecore.EClass type)
getExportedObjectsByType in interface ISelectablenull.