Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF Compare
EMF Compare [message #128062] Wed, 06 August 2008 05:14 Go to next message
Eclipse UserFriend
Originally posted by: lokesh.katiyar.india.thalesgroup.com

Hi

I had tried to compare identical xmi files through EMF Compare. but every
time its showing differences. Then I tried to compare these file through
option available in eclipse (Compare with each other) its showing "There
is no difference between selected inputs".

I tried to set the prefrences "Ignore XMI_ID for Model Comparision" and
"Ignore Functional ID for model comparision" but still its giving problem

Please let me know where I am wrong.
and tell me what i have to do to get the same message from my plugin as
Eclipse is showing.


Thanks


Lokesh
Re: EMF Compare [message #128074 is a reply to message #128062] Wed, 06 August 2008 05:55 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Lokesh,

Such behavior is happening when EMF compare is considering the technical ID's.

If I understand correctly you're launching the comparison using a Java program, right ? The preferences are only taken in account when using right click=> Compare..., if you want to ignore the XMI_ID's while comparing in a java program you should pass the option like this :

Map options = new HashMap();
options.put(MatchOptions.OPTION_IGNORE_XMI_ID, Boolean.TRUE);

And then call the MatchService with these options:

MatchModel match = MatchService.doMatch(model1, model2,options);


Cédric


Lokesh Katiyar wrote:

> Hi
>
> I had tried to compare identical xmi files through EMF Compare. but every
> time its showing differences. Then I tried to compare these file through
> option available in eclipse (Compare with each other) its showing "There
> is no difference between selected inputs".
>
> I tried to set the prefrences "Ignore XMI_ID for Model Comparision" and
> "Ignore Functional ID for model comparision" but still its giving problem
>
> Please let me know where I am wrong.
> and tell me what i have to do to get the same message from my plugin as
> Eclipse is showing.
>
>
> Thanks
>
>
> Lokesh


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: EMF Compare [message #128111 is a reply to message #128074] Wed, 06 August 2008 08:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lokesh.katiyar.india.thalesgroup.com

Hi Cadric,

you are correct that i am launching Comparision using java.
As you suggest i tried to set the MatchOptions but still same problem
occured.

Lokesh
Re: EMF Compare [message #128150 is a reply to message #128111] Wed, 06 August 2008 08:46 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.
--------------010602040002040802050903
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Lokesh,

First of all, what is the behavior you're expecting from the comparison?
You told that the GUI showed "no difference between the selected inputs"
while programmatic comparison detects differences in your models. Which
is right?

Then again, the dialog box you're shown in the GUI does not come from
EMF Compare. If I am not mistaken, it means org.eclipse.compare found
the two files to be identical byte-wise and then didn't bother to find
an associated comparison engine (which would mean this is the behavior
you are expecting when comparing through code).

Could you provide us with either the models you're trying to compare or
the type of differences that is inaccurately detected as well as the
type of objects on which they are? Please note that we have a somewhat
similar issue : https://bugs.eclipse.org/bugs/show_bug.cgi?id=242164 .

Regards

Laurent Goubet
Obeo

Lokesh Katiyar a
Re: EMF Compare [message #620188 is a reply to message #128062] Wed, 06 August 2008 05:55 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Lokesh,

Such behavior is happening when EMF compare is considering the technical ID's.

If I understand correctly you're launching the comparison using a Java program, right ? The preferences are only taken in account when using right click=> Compare..., if you want to ignore the XMI_ID's while comparing in a java program you should pass the option like this :

Map options = new HashMap();
options.put(MatchOptions.OPTION_IGNORE_XMI_ID, Boolean.TRUE);

And then call the MatchService with these options:

MatchModel match = MatchService.doMatch(model1, model2,options);


Cédric


Lokesh Katiyar wrote:

> Hi
>
> I had tried to compare identical xmi files through EMF Compare. but every
> time its showing differences. Then I tried to compare these file through
> option available in eclipse (Compare with each other) its showing "There
> is no difference between selected inputs".
>
> I tried to set the prefrences "Ignore XMI_ID for Model Comparision" and
> "Ignore Functional ID for model comparision" but still its giving problem
>
> Please let me know where I am wrong.
> and tell me what i have to do to get the same message from my plugin as
> Eclipse is showing.
>
>
> Thanks
>
>
> Lokesh


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: EMF Compare [message #620191 is a reply to message #128074] Wed, 06 August 2008 08:06 Go to previous message
Eclipse UserFriend
Originally posted by: lokesh.katiyar.india.thalesgroup.com

Hi Cadric,

you are correct that i am launching Comparision using java.
As you suggest i tried to set the MatchOptions but still same problem
occured.

Lokesh
Re: EMF Compare [message #620194 is a reply to message #128111] Wed, 06 August 2008 08:46 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.
--------------010602040002040802050903
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Lokesh,

First of all, what is the behavior you're expecting from the comparison?
You told that the GUI showed "no difference between the selected inputs"
while programmatic comparison detects differences in your models. Which
is right?

Then again, the dialog box you're shown in the GUI does not come from
EMF Compare. If I am not mistaken, it means org.eclipse.compare found
the two files to be identical byte-wise and then didn't bother to find
an associated comparison engine (which would mean this is the behavior
you are expecting when comparing through code).

Could you provide us with either the models you're trying to compare or
the type of differences that is inaccurately detected as well as the
type of objects on which they are? Please note that we have a somewhat
similar issue : https://bugs.eclipse.org/bugs/show_bug.cgi?id=242164 .

Regards

Laurent Goubet
Obeo

Lokesh Katiyar a
Previous Topic:EMF Compare
Next Topic:JPOXMappingException: URI <X> does not translate to an eclass
Goto Forum:
  


Current Time: Sat Apr 27 05:00:46 GMT 2024

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

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

Back to the top