Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Undo/Redo in emf
Undo/Redo in emf [message #415684] Fri, 28 December 2007 20:38 Go to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
Hi All,
I am not familiar with undo/redo mechanism in emf. I am using emf model in my application. Could you please point me to the some tutorials/samples. I would like to see all posibilities using undo/redo.
Thanks in advance,
Mowry
Re: Undo/Redo in emf [message #415685 is a reply to message #415684] Fri, 28 December 2007 20:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Mowry,

Every generated editor, like the one you get following any of the
tutorials, shows this in action. Generally you need to use commands to
make changes to the model and execute those commands on the command
stack which provide control over the ability to undo and redo the
commands that have been executed. There are simple command like
AddCommand, RemoveCommand, and SetCommand for making changes. A
ChangeCommand can be quite useful because it allows you to make
arbitrary directly changes to the model without using command. You'd do
that by specializing doExecute to do the processing processing; it
records the notifications the model produces as it's changed and is able
to undo and redo the changes based on that.


mowry wrote:
> Hi All,
> I am not familiar with undo/redo mechanism in emf. I am using emf model in my application. Could you please point me to the some tutorials/samples. I would like to see all posibilities using undo/redo.
> Thanks in advance,
> Mowry
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Choice eReference Adding in Ecore
Next Topic:Why is isModified() now returning false?
Goto Forum:
  


Current Time: Fri Apr 19 20:36:12 GMT 2024

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

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

Back to the top