Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Forward (redo) change description without using applyAndReverse
Forward (redo) change description without using applyAndReverse [message #654230] Mon, 14 February 2011 11:46 Go to previous message
Marek V is currently offline Marek V
Messages: 3
Registered: February 2011
Junior Member
Hi all,

Can anyone suggest a better approach then the one below to getting a "forward" (redo) change description rather than a reverse (undo) change description without running reverseAndApply against actual eobjects?

Brief context: An RCP client using EMF. Data is loaded as required from an app server (from a DB) and cached during an "editing session". A series of changes can be made to the cached data client side. A "Persist changes" button sends change description to app server. The app server loads current persisted versions of the objects from the DB, applies the same changes as were made on the client and commits the changes.

A change recorder seems almost ideal for this, but is there a good way to get a forward (redo) version of a change description without having to run applyAndReverse which actually makes changes to the original objects?

The option to clone the objects, "attach" the change description to the clones and run applyAndReverse seems very messy (even more so as it seems to require the change description is marshalled and then unmarshalled so it now holds proxies which can then be set to resolve to the clones and not the originals).

This recent post http://www.eclipse.org/forums/index.php?t=msg&th=204437& amp;start=0&S=0b602a970a8dc06b5267d96a3ca76d89 seems to imply there isn't a better way, but any additional ideas would be very welcome!

Should we consider enhancing the change recorder to support this or is this likely to be very difficult?

NOTE: our project has looked at CDO briefly and currently discounted it.

Many thanks,

Marek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:deleting the namespace
Next Topic:Ecore with nested, Inner Class
Goto Forum:
  


Current Time: Wed May 22 10:26:01 EDT 2013

Powered by FUDForum. Page generated in 0.01734 seconds