Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse EMF Model Transaction Development Guide
Previous Page Home Next Page

EMF Model Transaction Workspace Integration Overview

As a second part of the transaction framework there is a support layer for using the TransactionalEditingDomain in the context of an eclipse IOperationHistory. This support layer can be found in the org.eclipse.emf.workspace plugin and has the following main classes that can be used by clients:

  1. The WorkspaceEditingDomainFactory can be used to create a new transactional editing domain that delegates it command execution, undo and redo to an IOperationHistory that is either provided by the client or retrieved from the OperationHistoryFactory. Any EMF-style commands executed on this special transactional editing domain's command stack will be wrapped and executed on the operation history.
  2. All IOperations that will be making changes to a workspace transactional editing domain can subclass the AbstractEMFOperation class in order to obtain the necessary write lock. Note that undo and redo is handled automatically because the changes made during the operation's execution are recorded. The CompositeEMFOperation allows clients to compose operations that change their editing domain and those that make changes to non-EMF objects. Client must not make changes to non-EMF objects within an AbstractEMFOperation because undo/redo is expected to be handled automatically by recording changes to EMF objects.
  3. Clients can determine if an operation affects their EMF resource(s) by calling ResourceUndoContext.getAffectedResources(). This is particularly useful for IOperationHistoryListeners to determine whether or not a completed operation should be tagged with their own IUndoContext to signal that this operation should show up on their undo/redo menus.
  4. A WorkspaceSynchronizer is provided to help clients keep their editing domains synchronized with changes that are being made to files in the eclipse workspace.

Please refer to the tutorial Workspace Integration Tutorial.


Copyright (c) 2006 IBM Corporation and others. All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire