Skip to main content



      Home
Home » Modeling » EMF » [EMFStore] Redo capability
[EMFStore] Redo capability [message #1703283] Thu, 30 July 2015 05:52 Go to next message
Eclipse UserFriend
Hello guys!

On my EMF based plugin I'm using the EMFStores UIUndoLastOperationController to perform undo action on the local project. Logically, if there is undo should be redo also.
But after some time of investigation I couldn't find anything that will match opposite to UndoLastOperation functionality.

So, is there any way to fulfill the redo action for the whole local project?

Thanks.
Re: [EMFStore] Redo capability [message #1703683 is a reply to message #1703283] Tue, 04 August 2015 04:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

The EMFStore Operation Manager does not work like a command stack. When an undo is performed, we undo the changes on the model and remove the now undone operations from the list of saved operations.
That is why we don't have redo support, since the undo will remove the required information.

For your problem I can see two possible solutions:
#1) You could make a contribution so that ProjectSpaceBase.undoLastOperations(int) returns the undone operations. Accordingly the UI controller should do so as well. Based on the returned operations you could add a custom redo support in your code.
#2) The second approach would be to write an own UI undo controller, which gives you access to the operations. You can get the list of operations from ProjectSpace#getLocalChangePackage(). Calling #.removeAtEnd() on the change package will give you access to the operations. This approach does not require changes to EMFStore.

Cheers
Johannes
Re: [EMFStore] Redo capability [message #1704966 is a reply to message #1703683] Tue, 11 August 2015 03:58 Go to previous message
Eclipse UserFriend
Thanks Johannes!

I've proceed with the second option - that worked like a charm Smile
Previous Topic:[EMF Transaction] Exception during rollback
Next Topic:Referenced model
Goto Forum:
  


Current Time: Mon Jul 07 14:13:31 EDT 2025

Powered by FUDForum. Page generated in 0.07267 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top