Modify behaviour for GFWorkspaceCommandStackImpl.redo() ? [message #1416091] |
Thu, 04 September 2014 09:52 |
Laurent Le Moux Messages: 184 Registered: September 2011 |
Senior Member |
|
|
Hi all,
I use Graphiti to work on diagrams with - of course - modifications to my underlying EMF business models.
These models as well as the Graphiti diagrams are stored in a CDO repository shared with other users.
Therefore, before I perform any change through my Graphiti features, I have to acquire a write lock on the modified elements.
Moreover my features can be undone and redone.
For undo, this basically means that modifications are undone before the lock is released.
While, for redo, locking should take place before the modifications are redone.
All this lock/unlock handling is implemented in my features undo and redo methods.
But I found out that GFWorkspaceCommandStackImpl.redo applies EMF redo before the non-EMF one, that is, before executing my features redo that care about re-acquiring the necessary lock.
A workaround to my problem is to provide a slightly modified implementation of the GFWorkspaceCommandStackImpl class, in the redo method, to invert the execution so that EMF redo now takes place after the non-EMF one.
But I was wondering if this change could / should be integrated to the Graphiti framework ?
Kind regards,
Laurent
|
|
|
|
|
Re: Modify behaviour for GFWorkspaceCommandStackImpl.redo() ? [message #1434505 is a reply to message #1416126] |
Tue, 30 September 2014 07:10 |
|
Last week, I found another problem with the current implementation. I wanted to use CommandstackListener and ICustomUndoableFeatures. The problem is, only the EMF undo and redo notify the listeners, and this notification is before the customundoablefeature undo. I could manage this problem, I created my custom Commandstack implementation, inherited from the GFWorkspaceCommandStackImpl, and added new type of listeners. This listeners invoked after the customundofeature undo and redo.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02438 seconds