expected behaviour of EMFCompare when Compare two UML models [message #1775259] |
Thu, 26 October 2017 22:20  |
Eclipse User |
|
|
|
Hi,
I am using EMFCompare to compare two UML models (attached)
I noticed that one of the differences is goToEnd2[edge ADD] even though goToEnd2 is an old control flow as it exists in both UML models.
My question is : does this an expected behaviour for EMFCompare and if yes can you please explain why ?
Thanks,
Taghreed
|
|
|
Re: expected behaviour of EMFCompare when Compare two UML models [message #1775446 is a reply to message #1775259] |
Mon, 30 October 2017 05:20   |
Eclipse User |
|
|
|
Hi Taghreed,
EMF Compare uses XMI:ID-based matching if those IDs are available. In Papyrus models those are available by default. So the expected behavior would be that they are matched if their IDs are exactly the same. If they aren't the same, e.g., because you have deleted the edge and created a new edge with exactly the same values, EMF Compare would show a deletion and an addition instead.
Is the XMI:ID of the edge goToEnd2 in version 1 the same as in version 2?
If the XMI:ID is different and "just" the model elements' values are the same -- because you deleted and recreated this element, EMF Compare would have to do a content-based match to be able to correctly match those elements, which EMF Compare doesn't do by default, mainly because it would significantly slow down the comparison for larger models. If you require that, you can implement your own matcher that tries to re-match unmatched elements based on their contents and select this matcher in the EMF Compare preferences instead of the default one.
Best wishes,
Philip
[Updated on: Mon, 30 October 2017 05:21] by Moderator
|
|
|
Re: expected behaviour of EMFCompare when Compare two UML models [message #1775470 is a reply to message #1775446] |
Mon, 30 October 2017 11:29  |
Eclipse User |
|
|
|
Hi Philip,
Answer to your question:Is the XMI:ID of the edge goToEnd2 in version 1 the same as in version 2?
Yes they are same in both version and that's why i think that EMF compare doesn't behave as expected. I want EMF Compare to do the comparison by matching the XMI:IDs .I don't want to change its default behavior.
I attached both UML models which i compare between them. Can you please take a look.
Thanks,
Taghreed
[Updated on: Mon, 13 November 2017 22:00] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.25440 seconds