Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312550

Summary: Order change produces false add & remove
Product: [Modeling] EMFCompare Reporter: Patrick Konemann <patrick.koenemann>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet, tatiana.fesenko
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Unchanged and changed example files none

Description Patrick Konemann CLA 2010-05-12 05:06:22 EDT
Build Identifier: I20100429-1549

Rightclicking both files shown below and comparing them with each other yields three changes:
- order change of eClassifiers
- del reference http://www.eclipse.org/emf/2002/Ecore#//EByteObject
- add reference http://www.eclipse.org/emf/2002/Ecore#//EByteObject
although the only modification is the order of eClassifiers.

Tested with Eclipse 3.6M7.

The files shown below are also attached to this bug.

Example file unchanged:
--------------------8<--------------------
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecoretest"
    nsURI="ecoretest" nsPrefix="ecoretest">
  <eAnnotations source="http://ecore/Testing"
      references="http://www.eclipse.org/emf/2002/Ecore#//EByteObject">
    <details key="body" value="true / false"/>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EClass" name="SuperType1"/>
  <eClassifiers xsi:type="ecore:EDataType" name="Y"
      serializable="false" instanceTypeName="bla"/>
</ecore:EPackage>
-------------------->8--------------------

Example file changed:
--------------------8<--------------------
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecoretest"
    nsURI="ecoretest" nsPrefix="ecoretest">
  <eAnnotations source="http://ecore/Testing"
      references="http://www.eclipse.org/emf/2002/Ecore#//EByteObject">
    <details key="body" value="true / false"/>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EDataType" name="Y"
      serializable="false"instanceTypeName="bla"/>
  <eClassifiers xsi:type="ecore:EClass" name="SuperType1"/>
</ecore:EPackage>
-------------------->8-------------------- 

Reproducible: Always
Comment 1 Patrick Konemann CLA 2010-05-12 05:08:18 EDT
Created attachment 168102 [details]
Unchanged and changed example files
Comment 2 Laurent Goubet CLA 2011-08-09 05:58:18 EDT
The match, diff and merge process have seen a great deal of improvement in the
past week, with the addition of unit tests for most of the different use cases
(one use case = one possible "diff" between models) we could think of.

This particular issue can no longer be reproduced with these improvements.

These changes have been pushed on both master and the 1.2 maintenance stream.
They are available in the builds
 - 1.2 integration : I201108090404
 - 1.3 integration : I201108090415