Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Help me to fix reset list of command execution
Help me to fix reset list of command execution [message #1457487] Fri, 31 October 2014 11:25 Go to next message
ramukumar M is currently offline ramukumar MFriend
Messages: 14
Registered: June 2012
Junior Member
Hello All,
I have a dialog and It has 3 tables A,B,C.
Basic functionality is to fill items to B and C from A. and If I remove item either from B or C it has to go back to A.
All these actions are achieved after writing to model(EMF model) . to do that I am using basic commands like set / add/ remove./delete commands ,
if they click on cancel i have to revert all the changes don on this dialog.
Command execution is done then and there (This is the requirement Sad)
So i cant use compound command here.
Please give me an idea to solve this

Note:
All the there tables belongs to same model but different Eobjects Smile

Thanks in advance
Ramukumar M
Re: Help me to fix reset list of command execution [message #1461313 is a reply to message #1457487] Tue, 04 November 2014 12:32 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
You can remember the command stack's head (before calling the dialog to edit the objects) and revert/undo to the remembered position if the user presses cancel in the dialog (and make sure the undo operation is not available as long as the dialog is active).
You may also have a look at the transactions API which is much more powerful and could be the better fit.

ramukumar M wrote on Fri, 31 October 2014 12:25
Hello All,
I have a dialog and It has 3 tables A,B,C.
Basic functionality is to fill items to B and C from A. and If I remove item either from B or C it has to go back to A.
All these actions are achieved after writing to model(EMF model) . to do that I am using basic commands like set / add/ remove./delete commands ,
if they click on cancel i have to revert all the changes don on this dialog.
Command execution is done then and there (This is the requirement Sad)
So i cant use compound command here.
Please give me an idea to solve this

Note:
All the there tables belongs to same model but different Eobjects Smile

Thanks in advance
Ramukumar M

Previous Topic:How to enforce an EReference to be initialized on creation of container
Next Topic:EMF Object and discrepancy tolerance
Goto Forum:
  


Current Time: Mon Oct 14 06:02:01 GMT 2019

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

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

Back to the top