Skip to main content



      Home
Home » Modeling » EMF » Copy Commands from one Stack to antoher
Copy Commands from one Stack to antoher [message #788094] Wed, 01 February 2012 05:45 Go to next message
Eclipse UserFriend
Hi,
I have e the following situation.

I have a big Model and one central CommandStack.

Now I want a dialog that works one a piece of the Model.

In the dialog the user should be able to redo and undo his changes.....so I thought of EcoreUtil.copy(modelPiece) with a new own EditingDomain an its own CommandStack on which the dialog works.

At the end I would like to get all commands from the dialog-CommandStack and execute it on the main-CommandStack .

Now the Problem....I dont find any method to get the list of commands of my dialog-commandStack.

Am I blind or is there are better way to the whole thing ?

Regards Markus
Re: Copy Commands from one Stack to antoher [message #788178 is a reply to message #788094] Wed, 01 February 2012 07:48 Go to previous message
Eclipse UserFriend
Markus,

There's no access to the underlying list of commands; you could provide
that via a subclass. You'd need to paw through the commands in great
detail to replace references to clones with the originals. It sounds
tricky..

Maybe you'd be better to use a ChangeRecorder to keep track of what's
changed and apply those changes...



On 01/02/2012 11:45 AM, Markus Jo wrote:
> Hi,
> I have e the following situation.
>
> I have a big Model and one central CommandStack.
> Now I want a dialog that works one a piece of the Model.
>
> In the dialog the user should be able to redo and undo his
> changes.....so I thought of EcoreUtil.copy(modelPiece) with a new own
> EditingDomain an its own CommandStack on which the dialog works.
>
> At the end I would like to get all commands from the
> dialog-CommandStack and execute it on the main-CommandStack .
>
> Now the Problem....I dont find any method to get the list of commands
> of my dialog-commandStack.
>
> Am I blind or is there are better way to the whole thing ?
>
> Regards Markus
Previous Topic:[Compare] How to perform one-way-merge
Next Topic:EMF Java generation : interfaces packages versus implementation ones
Goto Forum:
  


Current Time: Fri Nov 07 11:26:14 EST 2025

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

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

Back to the top