UML Modeling Layer

com.ibm.xtools.uml.msl.internal.listeners
Class EditingDomainUndoContextListener

java.lang.Object
  extended by org.eclipse.emf.transaction.ResourceSetListenerImpl
      extended by com.ibm.xtools.uml.msl.internal.listeners.EditingDomainUndoContextListener
All Implemented Interfaces:
EventListener, IOperationHistoryListener, ResourceSetListener

public class EditingDomainUndoContextListener
extends ResourceSetListenerImpl
implements IOperationHistoryListener

Attaches an undo context for the singleton editing domain to any operation performed through the eclipse operation history if that operation has affected a resource in the singleton editing domain.


Constructor Summary
EditingDomainUndoContextListener()
          Initializes me to start listening to my operation history.
 
Method Summary
 void historyNotification(OperationHistoryEvent event)
          Adds my undo context to operations that are done that affected my editing domain.
 boolean isPostcommitOnly()
           
 void resourceSetChanged(ResourceSetChangeEvent event)
          Disposes my context from the operation history when a resource is unloaded from my editing domain.
 
Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl
getFilter, isAggregatePrecommitListener, isPrecommitOnly, transactionAboutToCommit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditingDomainUndoContextListener

public EditingDomainUndoContextListener()
Initializes me to start listening to my operation history.

Method Detail

historyNotification

public void historyNotification(OperationHistoryEvent event)
Adds my undo context to operations that are done that affected my editing domain.

Specified by:
historyNotification in interface IOperationHistoryListener

resourceSetChanged

public void resourceSetChanged(ResourceSetChangeEvent event)
Disposes my context from the operation history when a resource is unloaded from my editing domain.

Specified by:
resourceSetChanged in interface ResourceSetListener
Overrides:
resourceSetChanged in class ResourceSetListenerImpl

isPostcommitOnly

public boolean isPostcommitOnly()
Specified by:
isPostcommitOnly in interface ResourceSetListener
Overrides:
isPostcommitOnly in class ResourceSetListenerImpl

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.