|
Re: EList undo a "set" [message #425167 is a reply to message #425166] |
Tue, 18 November 2008 06:02 |
Renat Zubairov Messages: 30 Registered: July 2009 |
Member |
|
|
My first guess would be that parent-child relations to the elements in the
list should be affected by this change, i.e. In case of containment
reference container reference inside the objects in the list should be set
to Unset therefore REMOVE is triggered on the list content before setting a
new list inside.
BR
Renat
On 18.11.08 02:43, in article
d820eaf845211208fe0eef83a0ac20b2$1@www.eclipse.org, "Alex Boyko"
<aboyko@ca.ibm.com> wrote:
> Hi,
>
> I have an EAttribute of multiplicity many - an EList. Once I call
> #set(int, E) a SET event is fired. Change recorder records this an
> ADD_MANY and REMOVE. Hence, undo results in ADD and REMOVE change. Is this
> expected? If yes, why it's not recorded as a SET change, so when the
> change is undone a SET event is fired again with old and new object
> swapped?
> Thanks!
>
> Cheers,
> Alex
>
|
|
|
Re: EList undo a "set" [message #425173 is a reply to message #425166] |
Tue, 18 November 2008 07:02 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Alex,
The change recorder keeps the old value of the list and when it's time
to create a change description, it compares the original value to the
current value. Hence it can't tell whether the change happened as a
result of a set or a remove and an add. Of course the effect of either
is the same...
Alex Boyko wrote:
> Hi,
>
> I have an EAttribute of multiplicity many - an EList. Once I call
> #set(int, E) a SET event is fired. Change recorder records this an
> ADD_MANY and REMOVE. Hence, undo results in ADD and REMOVE change. Is
> this expected? If yes, why it's not recorded as a SET change, so when
> the change is undone a SET event is fired again with old and new
> object swapped?
> Thanks!
>
> Cheers,
> Alex
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03094 seconds