Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Meaning of AddReferenceValue in EMF Compare
Meaning of AddReferenceValue in EMF Compare [message #111493] Thu, 31 January 2008 19:40 Go to next message
Renata Roginsky is currently offline Renata RoginskyFriend
Messages: 10
Registered: July 2009
Junior Member
I take one model (which has dependencies on some other model), create a
copy of it and in the copied model change a couple of object names. Then I
run compare. My resulting Diff Model contains AttributeChange elements for
changes, as expected, but in addition to that it has a LOT of
“AddRefernceValue” and “RemoveReferenceValue” element pairs, that make no
sense to me. Here is an example:
<subDiffElements xsi:type="diff:AddReferenceValue">
<reference
href="http://www.eclipse.org/uml2/2.0.0/UML#//Dependency/supplier"/>
<rightElement
href=" platform:/resource/msgmodel.test/MessageModelV1.emx#_amT65ZO iEdyH-dJfEVLHtA "/>
<leftElement
href=" platform:/resource/msgmodel.test/MessageModel.emx#_amT65ZOiE dyH-dJfEVLHtA "/>
<rightAddedTarget
href=" platform:/resource/com.bglobal.infoarch.version.poc.domain/I nstrument.efx#_szPCqPTFEduthoHhllhVCQ?POCDomain%20Model/Inst rument/Instrument%20Transfer%20Type? "/>
</subDiffElements>
<subDiffElements xsi:type="diff:RemoveReferenceValue">
<reference
href="http://www.eclipse.org/uml2/2.0.0/UML#//Dependency/supplier"/>
<rightElement
href=" platform:/resource/msgmodel.test/MessageModelV1.emx#_amT65ZO iEdyH-dJfEVLHtA "/>
<leftElement
href=" platform:/resource/msgmodel.test/MessageModel.emx#_amT65ZOiE dyH-dJfEVLHtA "/>
<leftRemovedTarget
href=" platform:/resource/com.bglobal.infoarch.version.poc.domain/I nstrument.efx#_szPCqPTFEduthoHhllhVCQ?POCDomain%20Model/Inst rument/Instrument%20Transfer%20Type? "/>
</subDiffElements>

The “Target” here comes from the model upon which my two models depend.
What does it mean?
Re: Meaning of AddReferenceValue in EMF Compare [message #111535 is a reply to message #111493] Fri, 01 February 2008 00:23 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040301000107080605020608
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Renata,

I can't really understand why we would detect differences in the
references... "AddReferenceValue" represent an addition to a
multi-valued reference. in this case, the first of the two you supplied
can be read as :
"<rightAddedTarget> has been added to the list of values of the
reference "supplier" in the Dependency <_amT65ZOiEdyH-dJfEVLHtA>".
This last unreadable thing is the XMI ID (or ID attribute if one is
defined in your models) of the element which we detected a change on.

This difference we detected could come from the way you've loaded the
two models that need be compared. We have often assumed the two models
would be loaded in the same resourceSet and have compared references
values with "Object#equals()" ... which should probably be changed in an
equality test between the two values' URIs.

For now, you should load both models to compare in the same resourceSet
(see the "load" methods we defined in
"org.eclipse.emf.compare.util.ModelUtils").

Cheers,
Laurent Goubet
Obeo

Renata Roginsky a
Re: Meaning of AddReferenceValue in EMF Compare [message #615362 is a reply to message #111493] Fri, 01 February 2008 00:23 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040301000107080605020608
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Renata,

I can't really understand why we would detect differences in the
references... "AddReferenceValue" represent an addition to a
multi-valued reference. in this case, the first of the two you supplied
can be read as :
"<rightAddedTarget> has been added to the list of values of the
reference "supplier" in the Dependency <_amT65ZOiEdyH-dJfEVLHtA>".
This last unreadable thing is the XMI ID (or ID attribute if one is
defined in your models) of the element which we detected a change on.

This difference we detected could come from the way you've loaded the
two models that need be compared. We have often assumed the two models
would be loaded in the same resourceSet and have compared references
values with "Object#equals()" ... which should probably be changed in an
equality test between the two values' URIs.

For now, you should load both models to compare in the same resourceSet
(see the "load" methods we defined in
"org.eclipse.emf.compare.util.ModelUtils").

Cheers,
Laurent Goubet
Obeo

Renata Roginsky a
Previous Topic:[Announce] EMFT SEARCH 0.7.0 I200801311807 is available
Next Topic:[Compare] How to compare ecore models, content types
Goto Forum:
  


Current Time: Thu Sep 24 05:37:57 GMT 2020

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

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

Back to the top