EMF/Transaction/New and Noteworthy/Galileo
EMF Model Transaction New and Noteworthy items for the 1.3 (Galileo) release.
For more details about the development plan, see the EMF Galileo draft plan.
This milestone was completed on Wednesday, 24 September 2008.
Listener API Enhancements
Some long-awaited, and much-needed, additions were made in the listener APIs in this milestone. First, a ResourceSetListener.Internal interface provides private call-backs to ResourceSetListeners that implement it. This new protocol defines call-backs signalling to a listener when it is attached to or detached from a TransactionalEditingDomain. Naturally, all of the implementations of ResourceSetListener that are provided by the EMF Transaction component implement this new interface.
An entirely new listener API is the TransactionalEditingDomainListener interface. This may be attached by clients via a new TransactionalEditingDomain.Lifecycle optional adapter interface for editing domains. The call-backs signal life-cycle events, primarily in transactions, of the following kinds:
- pre-notification of the starting of a top-level transaction
- successful start of a top-level transaction
- interrupted start of a top-level transaction (thus a non-start)
- pre-notification of the closing of a top-level transaction
- successful or failed close of a top-level transaction
- disposal of the editing domain
Unlike the ResourceSetListener API, these listener events do not carry information about the changes that occurred in the EMF data. They do provide information about the management of transactions that was previously unavailable.
A couple of enhancements aim to provide greater flexibility to clients by removing API restrictions. These include:
- enabling the definition of arbitrary notification filtering via a new NotificationFilter.Custom class
- enabling client control over the re-use of the active transaction by an AbstractEMFOperation. This is especially useful for spontaneous construction and execution of commands by others while they are executing, as is often done by edit-helper commands in the GMF Run-time