Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » [EMFCompare] Diff: Deleted attribute from a class
[EMFCompare] Diff: Deleted attribute from a class [message #1053623] Mon, 06 May 2013 22:31 Go to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 77
Registered: December 2011
Member
I'm comparing two ecore files. When I delete an EAttribute, then I retrieve two differences. I don't understand the second Diff. Why there is a eType change? I was expecting only the first one.

  <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>




REFERENCE: org.eclipse.emf.ecore.impl.EReferenceImpl@546c585a (name: eStructuralFeatures) (ordered: true, unique: true, lowerBound: 0, upperBound: -1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (containment: true, resolveProxies: false)
VALUE: org.eclipse.emf.ecore.impl.EAttributeImpl@76a9b9c (name: name) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (iD: false)
KIND: DELETE
SOURCE: LEFT

REFERENCE: org.eclipse.emf.ecore.impl.EReferenceImpl@c5a67c9 (name: eType) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: true, transient: false, defaultValueLiteral: null, unsettable: true, derived: false) (containment: false, resolveProxies: true)
VALUE: org.eclipse.emf.ecore.impl.EDataTypeImpl@2c09505f (eProxyURI: http://www.eclipse.org/emf/2002/Ecore#//EInt)
KIND: CHANGE
SOURCE: LEFT

Re: [EMFCompare] Diff: Deleted attribute from a class [message #1053725 is a reply to message #1053623] Tue, 07 May 2013 11:56 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 400
Registered: July 2009
Senior Member
The eType difference is a sub-difference of the first one. By deleting the EAttribute, you also suppress the fact that eType of this reference targets an EObject. This is needed so that merge will always be consistent. If you are not interested in those you can easily filter them, see org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.filters.impl.SubDiffElementsFilter for reference.

http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:[EMF Compare] Retrieve original value of AttributeChange
Next Topic:Changes in UML Model
Goto Forum:
  


Current Time: Sun May 29 05:58:27 GMT 2016

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

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