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 ResourceUndoContexts. In general, these are the resources that

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.
 
Method Summary
 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.
 

Field Detail

DEFAULT

static final IResourceUndoContextPolicy DEFAULT
The default undo-context policy used by editing domains for which none is assigned by the client application.

Method Detail

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

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.