[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] ChangeRecorder issue ?

Hi,

I'm using the ChangeRecorder API and I have got a weird problem.

I monitor an EMF object "Canvas" that has a containment reference named "figures" of type Figure .

Let's imagine, one instance of this "Canvas" named canvas1 has 2 objects contained in the "figures" feature.

a) I start a change recorder for canvas1.
b) I unset the "figures" containment feature.
c) I end the change recorder and get the change description.

Result : no change happens for canvas1 : ChangeDescription#getObjectChanges(), ChangeDescription#getObjectsToAttach or ChangeDescription#getObjectsToDetach are empty collections !! Weird isn'it ?

When ending the change recorder, the BasicChangeRecorder#eliminateEmptyChanges() is called.
I debug the code, and the featureChange is retrieved according the unset on the "figures" feature. Nevertheless, It compares the value registered into the featureChange with the current value of the related feature on canvas1. Both lists are empty ones and hence equals, the featureChange is removed... What's a pitty !!


Is it a bug or normal behavior ? How can i figure out that issue ?

Stephane.