Hi Marco,
thanks for the example, it helped me to discover and fix another
bug in the development version.
Now to your problem. This seems to be an issue related to
EMFCompare, which is used for computing and displaying the diff.
How it works is that we make a complete copy of the input model,
transform it and compare it to the original model. I rechecked
that Henshin does the right thing and it does: it only removes the
A-class and its incoming references, nothing else. So this problem
must be caused by EMFCompare.
I noticed also something else in your example. Your instance model
is typed over the "static" UML meta model (it does not use the
metamodel in your UML.ecore file). On the other hand, your Henshin
file imports and uses the UML.ecore file. This can lead to
problems at runtime. Currently the interpreter wizard resolves
these issues automatically, but in general it is not the right way
to do it. The right way to do it would be one of these options:
Option 1: Use the static UML2 metamodel in your Henshin file. For
this, click on "Import Packages -> From Registry", choose
"Runtime version" and select this URL:
"http://www.eclipse.org/uml2/3.0.0/UML" (the one you also use in
the instance model).
Option 2: Use the dynamic UML2 metamodel (the one in UML.ecore) in
your instance model. To create a dynamic instance model, select
the UML.ecore file, click on "Henshin -> Create Dynamic
Instance" and edit it with the sample reflective editor.
Bottom line: you should consistently use the same metamodels in
your transformation and your instance models.
Regarding EMFCompare, I do not really know what to do. You could
try to invoke EMFCompare directly using the two models (input and
output model) and see if you get the same result (which I strongly
suspect) and ask the EMFCompare guys for help.
Cheers,
Christian
On 09/04/2012 01:52 PM, Marco Konersmann wrote: