Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] OPTION_DISTINCT_METAMODELS XML files
[EMF Compare] OPTION_DISTINCT_METAMODELS XML files [message #514775] Tue, 16 February 2010 10:35 Go to next message
Eclipse UserFriend
Originally posted by: mugbi83.googlemail.com

Hi
I have an other question concerning EMF Compare and the option
"OPTION_DISTINCT_METAMODELS"

I am trying to compare two XML models (in a standalone version) that
look like this

<?xml version="1.0" encoding="UTF-8"?>
<modrep:SchoolType xmlns:modrep="http://qe.informatik.uibk.ac.a/modrep">
<student name="Franz"/>
<student name="Otto"/>
<teacher name="Ludwig" teaches="Franz" Age="45.2" name2="Peter"/>
<teacher name="Ruth" teaches="Franz Otto" Age="35.1" name2="Gruber"/>
</modrep:SchoolType>

compared with

<?xml version="1.0" encoding="UTF-8"?>
<modrep:SchoolType xmlns:modrep="http://qe.informatik.uibk.ac.a/modrep">
<student name="Franz"/>
<student name="Otto"/>
<teacher name="Ludwig" teaches="Franz" Age="45.2"/>
<teacher name="Ruth" teaches="Franz Otto" Age="35.1"/>
</modrep:SchoolType>
--------------------------

Both models have different Ecore metamodels which are used to load them
into EObjects (name2 attribute added).

Since the metamodels are different I used the option
"OPTION_DISTINCT_METAMODELS". Without that option it actually works but
EMF Compare claims that the teachers were removed (the ones with name2)
and the ones without name2 were added. It does not recognize that just
an attribute changed ( was added).
When I used the option for distinct metamodels I just get an error that
name2 is no feature(The feature name2 does not exist in TeacherType.)
thrown by the function "checkForDiffs(current, match);".

Did I misunderstand the idea of the distinct metamodel option? Does
somebody have a hint on how to solve that problem?

Thank you very much
Philipp
Re: [EMF Compare] OPTION_DISTINCT_METAMODELS XML files [message #514934 is a reply to message #514775] Wed, 17 February 2010 04:10 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------090802040107050700070401
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Philip,

The "distinct metamodels" option was first intended to be used to avoid
strict equality tests on the compared elements' metaclasses. We still
compare these elements content though, and that means comparing A.name2
to B.name2 ... In your case, there is no such thing as B.name2, thus the
failure.

This is not in our roadmap for Helios, could you raise a bug to track
this issue so we might see if we wish this included it in a future release?

Laurent Goubet
Obeo

Philipp Kalb wrote:
> Hi
> I have an other question concerning EMF Compare and the option
> "OPTION_DISTINCT_METAMODELS"
>
> I am trying to compare two XML models (in a standalone version) that
> look like this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <modrep:SchoolType xmlns:modrep="http://qe.informatik.uibk.ac.a/modrep">
> <student name="Franz"/>
> <student name="Otto"/>
> <teacher name="Ludwig" teaches="Franz" Age="45.2" name2="Peter"/>
> <teacher name="Ruth" teaches="Franz Otto" Age="35.1" name2="Gruber"/>
> </modrep:SchoolType>
>
> compared with
>
> <?xml version="1.0" encoding="UTF-8"?>
> <modrep:SchoolType xmlns:modrep="http://qe.informatik.uibk.ac.a/modrep">
> <student name="Franz"/>
> <student name="Otto"/>
> <teacher name="Ludwig" teaches="Franz" Age="45.2"/>
> <teacher name="Ruth" teaches="Franz Otto" Age="35.1"/>
> </modrep:SchoolType>
> --------------------------
>
> Both models have different Ecore metamodels which are used to load them
> into EObjects (name2 attribute added).
>
> Since the metamodels are different I used the option
> "OPTION_DISTINCT_METAMODELS". Without that option it actually works but
> EMF Compare claims that the teachers were removed (the ones with name2)
> and the ones without name2 were added. It does not recognize that just
> an attribute changed ( was added).
> When I used the option for distinct metamodels I just get an error that
> name2 is no feature(The feature name2 does not exist in TeacherType.)
> thrown by the function "checkForDiffs(current, match);".
>
> Did I misunderstand the idea of the distinct metamodel option? Does
> somebody have a hint on how to solve that problem?
>
> Thank you very much
> Philipp
>
>


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

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard


--------------090802040107050700070401--
Re: [EMF Compare] OPTION_DISTINCT_METAMODELS XML files [message #514987 is a reply to message #514934] Wed, 17 February 2010 07:16 Go to previous message
Eclipse UserFriend
Originally posted by: mugbi83.googlemail.com

hi

Thank you very much for your response.

Here is my bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303052

I hope that it contains all the important information.

regards
Philipp

Am 2010-02-17 10:10, schrieb Laurent Goubet:
> Hi Philip,
>
> The "distinct metamodels" option was first intended to be used to avoid
> strict equality tests on the compared elements' metaclasses. We still
> compare these elements content though, and that means comparing A.name2
> to B.name2 ... In your case, there is no such thing as B.name2, thus the
> failure.
>
> This is not in our roadmap for Helios, could you raise a bug to track
> this issue so we might see if we wish this included it in a future release?
>
> Laurent Goubet
> Obeo
>
>
Re: [EMF Compare] OPTION_DISTINCT_METAMODELS XML files [message #622167 is a reply to message #514775] Wed, 17 February 2010 04:10 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------090802040107050700070401
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Philip,

The "distinct metamodels" option was first intended to be used to avoid
strict equality tests on the compared elements' metaclasses. We still
compare these elements content though, and that means comparing A.name2
to B.name2 ... In your case, there is no such thing as B.name2, thus the
failure.

This is not in our roadmap for Helios, could you raise a bug to track
this issue so we might see if we wish this included it in a future release?

Laurent Goubet
Obeo

Philipp Kalb wrote:
> Hi
> I have an other question concerning EMF Compare and the option
> "OPTION_DISTINCT_METAMODELS"
>
> I am trying to compare two XML models (in a standalone version) that
> look like this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <modrep:SchoolType xmlns:modrep="http://qe.informatik.uibk.ac.a/modrep">
> <student name="Franz"/>
> <student name="Otto"/>
> <teacher name="Ludwig" teaches="Franz" Age="45.2" name2="Peter"/>
> <teacher name="Ruth" teaches="Franz Otto" Age="35.1" name2="Gruber"/>
> </modrep:SchoolType>
>
> compared with
>
> <?xml version="1.0" encoding="UTF-8"?>
> <modrep:SchoolType xmlns:modrep="http://qe.informatik.uibk.ac.a/modrep">
> <student name="Franz"/>
> <student name="Otto"/>
> <teacher name="Ludwig" teaches="Franz" Age="45.2"/>
> <teacher name="Ruth" teaches="Franz Otto" Age="35.1"/>
> </modrep:SchoolType>
> --------------------------
>
> Both models have different Ecore metamodels which are used to load them
> into EObjects (name2 attribute added).
>
> Since the metamodels are different I used the option
> "OPTION_DISTINCT_METAMODELS". Without that option it actually works but
> EMF Compare claims that the teachers were removed (the ones with name2)
> and the ones without name2 were added. It does not recognize that just
> an attribute changed ( was added).
> When I used the option for distinct metamodels I just get an error that
> name2 is no feature(The feature name2 does not exist in TeacherType.)
> thrown by the function "checkForDiffs(current, match);".
>
> Did I misunderstand the idea of the distinct metamodel option? Does
> somebody have a hint on how to solve that problem?
>
> Thank you very much
> Philipp
>
>


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

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard


--------------090802040107050700070401--
Re: [EMF Compare] OPTION_DISTINCT_METAMODELS XML files [message #622168 is a reply to message #514934] Wed, 17 February 2010 07:16 Go to previous message
Eclipse UserFriend
Originally posted by: mugbi83.googlemail.com

hi

Thank you very much for your response.

Here is my bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303052

I hope that it contains all the important information.

regards
Philipp

Am 2010-02-17 10:10, schrieb Laurent Goubet:
> Hi Philip,
>
> The "distinct metamodels" option was first intended to be used to avoid
> strict equality tests on the compared elements' metaclasses. We still
> compare these elements content though, and that means comparing A.name2
> to B.name2 ... In your case, there is no such thing as B.name2, thus the
> failure.
>
> This is not in our roadmap for Helios, could you raise a bug to track
> this issue so we might see if we wish this included it in a future release?
>
> Laurent Goubet
> Obeo
>
>
Previous Topic:Manually creating persistence.xml or hbm.xml
Next Topic:[EEF] Databinding and non-SWT UIs
Goto Forum:
  


Current Time: Sun Jul 13 08:15:23 EDT 2025

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

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

Back to the top