Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Child comparison problem
Child comparison problem [message #622914] Wed, 19 May 2010 14:31 Go to next message
Vitaly Savickas is currently offline Vitaly SavickasFriend
Messages: 62
Registered: March 2010
Member
Hello,

I will be glad for any advice on how to overcome the problem I've encountered when using EMF compare on my model. The essence of the problem is the following:

Let's say I have a model with two objects at root: A and B. Both have a child named C (same name, but different content). When I compare the two copies of the model there are obviously no differences. But as soon as I make a change to one model, say add a new object D to a root, I get not just one difference (D has been added), but three (B.C removed, B.C added, D added).

What I have at the moment is a custom MatchEngine with overridden methods isSimilar(...), findMostSimilar(...) etc. I'd like to know what must be implemented to fix this issue?

Regards,
Vitaly
Re: Child comparison problem [message #622915 is a reply to message #622914] Thu, 20 May 2010 07:24 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010702090606010302060400
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Vitaly,

The "isSimilar()" method you overrode in your custom match engine is
what's causing problems here. Namely, if "isSimilar()" returns false for
your objects "B.C" for any reason, you will get two diffs : "B.C has
been removed" and "B.C has been added".

You'll have to double check your implementation of isSimilar to find why
you're returning false when the two parameters are your "C" objects.

Laurent Goubet
Obeo

Vitaly Savickas wrote:
> Hello,
>
> I will be glad for any advice on how to overcome the problem I've
> encountered when using EMF compare on my model. The essence of the
> problem is the following:
>
> Let's say I have a model with two objects at root: A and B. Both have a
> child named C (same name, but different content). When I compare the two
> copies of the model there are obviously no differences. But as soon as I
> make a change to one model, say add a new object D to a root, I get not
> just one difference (D has been added), but three (B.C removed, B.C
> added, D added).
>
> What I have at the moment is a custom MatchEngine with overridden
> methods isSimilar(...), findMostSimilar(...) etc. I'd like to know what
> must be implemented to fix this issue?
>
> Regards,
> Vitaly


--------------010702090606010302060400
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------010702090606010302060400--
Previous Topic:[EEF] Generate Architecture error
Next Topic:Child comparison problem
Goto Forum:
  


Current Time: Wed Apr 24 17:10:21 GMT 2024

Powered by FUDForum. Page generated in 0.03002 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top