Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMFStore] Redo capability
[EMFStore] Redo capability [message #1703283] Thu, 30 July 2015 09:52 Go to next message
Taras Vuyiv is currently offline Taras VuyivFriend
Messages: 4
Registered: July 2015
Junior Member
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 08:54 Go to previous messageGo to next message
Johannes Faltermeier is currently offline Johannes FaltermeierFriend
Messages: 92
Registered: December 2013
Member

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


Johannes Faltermeier

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFStore] Redo capability [message #1704966 is a reply to message #1703683] Tue, 11 August 2015 07:58 Go to previous message
Taras Vuyiv is currently offline Taras VuyivFriend
Messages: 4
Registered: July 2015
Junior Member
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: Thu Aug 22 17:34:00 GMT 2019

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

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

Back to the top