Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] comparing uml models
[EMF Compare] comparing uml models [message #136183] Wed, 13 May 2009 06:42 Go to next message
Patrick Konemann is currently offline Patrick KonemannFriend
Messages: 116
Registered: July 2009
Senior Member
Hi!

I would like to compare to versions of a uml model, but there are the following issues:

1. how to ignore annotations?
The rational software modeler uses the uml2 metamodel from [1] and stores the diagrams in annotations of packages:
- package xyz
- annotation
+ diagram
+ class A
+ class B
Hence, each time I just want to compare the _model_, the diagrams are also part of the comparison.
I have seen a filter feature in the generic match engine -- can I exploit that for filtering the annotations containing the diagrams?
What would be the designated way of ignoring model elements in the comparison process?


2. Is there already an example available of how uml associations can be dealt with in EMF Compare as explained in [2]?
Or in general whether there already exists a diff engine which is better suited for uml models than the generic engine?


Cheers
Patrick


[1] http://www.eclipse.org/modeling/mdt/?project=uml2
[2] http://wiki.eclipse.org/Extending_the_differences_model
Re: [EMF Compare] comparing uml models [message #136330 is a reply to message #136183] Wed, 13 May 2009 11:55 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040908030305020100070308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Patrick,

See comments inlined

Laurent Goubet
Obeo

Patrick K
Re: [EMF Compare] comparing uml models [message #136349 is a reply to message #136330] Wed, 13 May 2009 14:34 Go to previous messageGo to next message
Patrick Konemann is currently offline Patrick KonemannFriend
Messages: 116
Registered: July 2009
Senior Member
Hi Laurent,

Thanks for the answer, I'll give the diff extension a try as soon as I have time for that :-)

Request raised concerning filtering: https://bugs.eclipse.org/bugs/show_bug.cgi?id=276096

Patrick


On 13-05-2009 13:55, laurent Goubet wrote:
> Hi Patrick,
>
> See comments inlined
>
> Laurent Goubet
> Obeo
>
> Patrick Könemann a écrit :
>> Hi!
>>
>> I would like to compare to versions of a uml model, but there are the
>> following issues:
>>
>> 1. how to ignore annotations?
>> The rational software modeler uses the uml2 metamodel from [1] and
>> stores the diagrams in annotations of packages:
>> - package xyz
>> - annotation
>> + diagram
>> + class A
>> + class B
>> Hence, each time I just want to compare the _model_, the diagrams are
>> also part of the comparison.
>> I have seen a filter feature in the generic match engine -- can I
>> exploit that for filtering the annotations containing the diagrams?
>> What would be the designated way of ignoring model elements in the
>> comparison process?
>
> We currently provide no "good" way of ignoring elements in such cases.
> The best way would be for us to add a "shouldIgnore" method in the
> GenericMatchEngine as this would allow clients to ignore an EObject and
> prune its content from the matching phase... yet this isn't an option as
> yet since it isn't implemented (could you raise an enhancement request
> for this?).
>
> You can still work around this limitation by overriding
> GenericMatchEngine#isSimilar() and return false whenever one of the
> objects is an Annotation : we won't go within unmatched elements and
> elements for which "isSimilar()" always return false are unmatched :).
> When this is done you will still need to override the two
> GenericDiffEngine#processUnmatchedElements methods and call super iff
> unmatched.getElement is not instanceof Annotation.
>
>>
>>
>> 2. Is there already an example available of how uml associations can
>> be dealt with in EMF Compare as explained in [2]?
>
> yup, org.eclipse.emf.compare.examples.diff.extension is what you seek.
> It is available on cvs in
> org.eclipse.emf/org.eclipse.emf.compare/examples (viewcvs url
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf.compare/examples/org.eclipse.emf.compare.exampl es.diff.extension/?root=Modeling_Project
> ).
>
>> Or in general whether there already exists a diff engine which is
>> better suited for uml models than the generic engine?
>>
>
> We had started researching ways to defined uml-specific engines yet
> never got any time to do it. We'd rather have the generic engine fixed
> or at least having the best possible results before exploring specific
> implementations.
>
>>
>> Cheers
>> Patrick
>>
>>
>> [1] http://www.eclipse.org/modeling/mdt/?project=uml2
>> [2] http://wiki.eclipse.org/Extending_the_differences_model
>
Re: [EMF Compare] comparing uml models [message #136411 is a reply to message #136349] Thu, 14 May 2009 08:09 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.
--------------000500090607050000020007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Patrick,

Thanks for the request and don't hesitate to come back if anything
doesn't go as expected with the diff extension :).

Laurent Goubet
Obeo

Patrick K
Re: [EMF Compare] comparing uml models [message #620942 is a reply to message #136183] Wed, 13 May 2009 11:55 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.
--------------040908030305020100070308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Patrick,

See comments inlined

Laurent Goubet
Obeo

Patrick K
Re: [EMF Compare] comparing uml models [message #620944 is a reply to message #136330] Wed, 13 May 2009 14:34 Go to previous message
Patrick Konemann is currently offline Patrick KonemannFriend
Messages: 116
Registered: July 2009
Senior Member
Hi Laurent,

Thanks for the answer, I'll give the diff extension a try as soon as I have time for that :-)

Request raised concerning filtering: https://bugs.eclipse.org/bugs/show_bug.cgi?id=276096

Patrick


On 13-05-2009 13:55, laurent Goubet wrote:
> Hi Patrick,
>
> See comments inlined
>
> Laurent Goubet
> Obeo
>
> Patrick Könemann a écrit :
>> Hi!
>>
>> I would like to compare to versions of a uml model, but there are the
>> following issues:
>>
>> 1. how to ignore annotations?
>> The rational software modeler uses the uml2 metamodel from [1] and
>> stores the diagrams in annotations of packages:
>> - package xyz
>> - annotation
>> + diagram
>> + class A
>> + class B
>> Hence, each time I just want to compare the _model_, the diagrams are
>> also part of the comparison.
>> I have seen a filter feature in the generic match engine -- can I
>> exploit that for filtering the annotations containing the diagrams?
>> What would be the designated way of ignoring model elements in the
>> comparison process?
>
> We currently provide no "good" way of ignoring elements in such cases.
> The best way would be for us to add a "shouldIgnore" method in the
> GenericMatchEngine as this would allow clients to ignore an EObject and
> prune its content from the matching phase... yet this isn't an option as
> yet since it isn't implemented (could you raise an enhancement request
> for this?).
>
> You can still work around this limitation by overriding
> GenericMatchEngine#isSimilar() and return false whenever one of the
> objects is an Annotation : we won't go within unmatched elements and
> elements for which "isSimilar()" always return false are unmatched :).
> When this is done you will still need to override the two
> GenericDiffEngine#processUnmatchedElements methods and call super iff
> unmatched.getElement is not instanceof Annotation.
>
>>
>>
>> 2. Is there already an example available of how uml associations can
>> be dealt with in EMF Compare as explained in [2]?
>
> yup, org.eclipse.emf.compare.examples.diff.extension is what you seek.
> It is available on cvs in
> org.eclipse.emf/org.eclipse.emf.compare/examples (viewcvs url
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf.compare/examples/org.eclipse.emf.compare.exampl es.diff.extension/?root=Modeling_Project
> ).
>
>> Or in general whether there already exists a diff engine which is
>> better suited for uml models than the generic engine?
>>
>
> We had started researching ways to defined uml-specific engines yet
> never got any time to do it. We'd rather have the generic engine fixed
> or at least having the best possible results before exploring specific
> implementations.
>
>>
>> Cheers
>> Patrick
>>
>>
>> [1] http://www.eclipse.org/modeling/mdt/?project=uml2
>> [2] http://wiki.eclipse.org/Extending_the_differences_model
>
Re: [EMF Compare] comparing uml models [message #620949 is a reply to message #136349] Thu, 14 May 2009 08:09 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.
--------------000500090607050000020007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Patrick,

Thanks for the request and don't hesitate to come back if anything
doesn't go as expected with the diff extension :).

Laurent Goubet
Obeo

Patrick K
Previous Topic:Teneo1.0.3 requires EMF setter for one-to-many association
Next Topic:[EMF Compare]: Starting comparison/Opening two files
Goto Forum:
  


Current Time: Thu Apr 25 03:44:07 GMT 2024

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

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

Back to the top