public interface IResourceSaveIndicator
extends org.eclipse.emf.workspace.util.WorkspaceSynchronizer.Delegate
resource
s.Modifier and Type | Method and Description |
---|---|
java.util.Collection<org.eclipse.emf.ecore.resource.Resource> |
getDirtyResources()
Returns all
resource s in underlying editing domain which are currently
dirty. |
boolean |
isDirty(org.eclipse.emf.ecore.resource.Resource resource)
Determines if the given
resource is dirty. |
boolean |
isSaved(org.eclipse.emf.common.util.URI uri)
Test if the
resource behind given URI has just been saved. |
void |
setDirty(org.eclipse.emf.ecore.resource.Resource resource)
Makes the given
resource dirty. |
void |
setSaved(java.util.Collection<org.eclipse.emf.ecore.resource.Resource> resources)
Clears dirty state of given collection of
resource s and remembers them as having just been
saved. |
void |
setSaved(org.eclipse.emf.ecore.resource.Resource resource)
Clears dirty state of given
resource and remembers it as having just been saved. |
void |
unsetDirty(org.eclipse.emf.ecore.resource.Resource resource)
Makes the given
resource un-dirty. |
boolean isDirty(org.eclipse.emf.ecore.resource.Resource resource)
resource
is dirty. A resource
is considered dirty if
its content has been modified but not been saved yet.resource
- The resource
to be investigated.true
if specified resource
is dirty, or false
otherwise.setDirty(Resource)
,
getDirtyResources()
,
setSaved(Resource)
void setDirty(org.eclipse.emf.ecore.resource.Resource resource)
resource
dirty.resource
- The resource
to be handled.isDirty(Resource)
,
unsetDirty(Resource)
,
getDirtyResources()
void unsetDirty(org.eclipse.emf.ecore.resource.Resource resource)
resource
un-dirty.resource
- The resource
to be handled.isDirty(Resource)
,
setDirty(Resource)
,
getDirtyResources()
java.util.Collection<org.eclipse.emf.ecore.resource.Resource> getDirtyResources()
resource
s in underlying editing domain
which are currently
dirty.resource
s with are currently dirty, or and empty collection if no
dirty resources exist.isDirty(Resource)
,
setDirty(Resource)
,
setSaved(Collection)
boolean isSaved(org.eclipse.emf.common.util.URI uri)
resource
behind given URI
has just been saved. This method typically needs
to be called when an resource change event
indicates that the content of the
file
behind given URI
has changed. Based on the returned result the caller can determine if
a resource change event
is just a consequence of a preceding save operation or if
the file
's content has been changed otherwise (e.g., via a text editor or some other tool affecting
the resource
in its serialized form).uri
- The URI
of the resource
to be investigated.true
if given resource
has just been saved, or false
otherwise.setSaved(Resource)
,
setSaved(Collection)
void setSaved(org.eclipse.emf.ecore.resource.Resource resource)
resource
and remembers it as having just been saved. This method
needs to be called by all clients which perform a save operation of some resource
right after
the save operation has been completed. Clients can then call isSaved(URI)
to determine if subsequently
raised resource change event
s are just a consequence of the preceding save operation
or if the underlying file
's content has been changed otherwise (e.g., via a text editor or some
other tool affecting the resource
in its serialized form).resource
- The resource
to be handled.isDirty(Resource)
,
isSaved(URI)
,
setSaved(Collection)
void setSaved(java.util.Collection<org.eclipse.emf.ecore.resource.Resource> resources)
resource
s and remembers them as having just been
saved. This method needs to be called by all clients which perform a save operation of some collection of
resource
s right after the save operation has been completed. Clients can then call
isSaved(URI)
to determine if subsequently raised resource change event
s are
just a consequence of the preceding save operation or if the underlying file
s' content has been
changed otherwise (e.g., via a text editor or some other tool affecting the resource
in its
serialized form).resource
- The collection of resource
s to be handled.isDirty(Resource)
,
isSaved(URI)
,
setSaved(Collection)