org.eclipse.emf.workspace
Interface IResourceUndoContextPolicy
-
All Known Implementing Classes:
-
AbstractResourceUndoContextPolicy
-
public interface IResourceUndoContextPolicy
A rule determining the resources for which an
IUndoableOperation
should be tagged with
ResourceUndoContext
s. In general, these are the
resources that
- are modified by the operation, such that they are become dirty, and/or
- whose editors should show the operation in their Undo menu
Clients may implement this interface, but it is recommended to extend the
AbstractResourceUndoContextPolicy
class whenever possible.
-
Since:
- 1.3
-
See Also:
-
AbstractResourceUndoContextPolicy
Field Summary
|
static
IResourceUndoContextPolicy
|
DEFAULT
The default undo-context policy used by editing domains for which none is
assigned by the client application. |
DEFAULT
static final
IResourceUndoContextPolicy DEFAULT
- The default undo-context policy used by editing domains for which none is
assigned by the client application.
getContextResources
Set<
Resource> getContextResources(
IUndoableOperation operation,
List<? extends
Notification> notifications)
- Determines the resources in the undo context of the specified
operation, during which execution the changes indicated by the
given notifications occurred. This operation may be called
several times for the same operation, but always with different
notifications.
-
-
Parameters:
-
operation
- the operation. It may or may not have finished executing. Must
not be null
-
notifications
- a list of notifications of changes caused by the operation
during its execution, in the order in which they occurred.
This may be an empty list, but never null
-
Returns:
- the resources that are the undo context of this operation, or an
empty list if none. Never ruterns
null