Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » [EMF Compare] Ignore order in EMFCompare
[EMF Compare] Ignore order in EMFCompare [message #1046737] Mon, 22 April 2013 09:49 Go to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 38
Registered: December 2011
Member
I'm comparing ecore models and the following example returns an EMF Compare move. In the following example I move the name Attribute. The same happens when I change the order of the classes in the ecore model.

original code:
<eClassifiers xsi:type="ecore:EClass" name="Author">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="test" eType="#//Book" eOpposite="#//Book/test"/>
  </eClassifiers>


moved "name" element
<eClassifiers xsi:type="ecore:EClass" name="Author">
    <eStructuralFeatures xsi:type="ecore:EReference" name="test" eType="#//Book" eOpposite="#//Book/test"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>


They are not breaking the generated code. Is it possible in EMF Compare to set these changes to be ignored?
Re: [EMF Compare] Ignore order in EMFCompare [message #1047411 is a reply to message #1046737] Tue, 23 April 2013 07:07 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
Registered: July 2009
Senior Member
Aleksandar,

EMF Compare does not detect "changes that break the generated code". It compares the two given models and detects differences between them, without any assumption that these models are used to generated code (and without assuming that this will be the "default" generated code). Ordering differences will be detected on all "ordered" features, as well as on "containment" features.

That being said, these differences can be ignored. Please see the FAQ on that point.

Laurent Goubet
Obeo
Re: [EMF Compare] Ignore order in EMFCompare [message #1047471 is a reply to message #1046737] Tue, 23 April 2013 08:52 Go to previous message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 38
Registered: December 2011
Member
Thanks! That was exactly what I wanted.
Previous Topic:Logical model compare (Compare 1.3.1, with SVN)
Next Topic:[EMF Compare] Compute degree of similarity
Goto Forum:
  


Current Time: Sun Dec 21 11:30:23 GMT 2014

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

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