|Re: Copying & Replacing EObjects. [message #886486 is a reply to message #886128]
||Fri, 15 June 2012 03:03
|| Christian W. Damus
Registered: July 2009
Another thing you might try: attach a ChangeRecorder to your model
when the dialog opens. Let the dialog make changes, as usual. If OK
is pressed, fine. Remove the ChangeRecorder and continue. If Cancel
is pressed, stop the ChangeRecorder and apply() the ChangeDescription
to undo all of the changes that were made by the dialog.
Does EcoreUtil::replace() handle references to the objects that were
copied from objects that weren't copied? Does it change those
references to point to the replacements? That would, indeed, be cool
On 2012-06-14 09:49:12 +0000, Frank Goldwin said:
> I found the 'elegant' solution thanks to the magnificent EcoreUtil.
> I've used EcoreUtil.replace(obj1, obje2) to replace it.
> It seems to work like a charm.
> Thank you EMF team for your great work.
> You've thought of everything!
Powered by FUDForum
. Page generated in 0.01985 seconds