Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] UpdateReference: leftTarget or rightTarget?
[EMF Compare] UpdateReference: leftTarget or rightTarget? [message #532113] Fri, 07 May 2010 08:04 Go to next message
Patrick Konemann is currently offline Patrick KonemannFriend
Messages: 116
Registered: July 2009
Senior Member
Hi again,

I was running my tests on the latest 3.6M7 release and I found out that
the leftTarget and rightTarget switched for updated references. Is that
intended or is it a mistake?


ReferenceCheck.createUpdatedReferenceOperation(..) in 3.5.1:

EObject rightTarget = getMatchedEObject(addedValue); // left: add
EObject leftTarget = getMatchedEObject(deletedValue); // right: del
// checks if target are defined remotely
if (leftTarget == null) {
leftTarget = deletedValue; // left: del
}
if (rightTarget == null) {
rightTarget = addedValue; // right: add
}

------------------------------

ReferenceCheck.createUpdatedReferenceOperation(..) in 3.6M7:

EObject leftTarget = getMatchedEObject(addedValue); // left: add ???
EObject rightTarget = getMatchedEObject(deletedValue); // right: del ???
// checks if target are defined remotely
if (leftTarget == null) {
leftTarget = deletedValue; // left: del
}
if (rightTarget == null) {
rightTarget = addedValue; // right: add
}
Re: [EMF Compare] UpdateReference: leftTarget or rightTarget? [message #532818 is a reply to message #532113] Tue, 11 May 2010 09:36 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.
--------------020401020102050508070208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Patrick,

yup, this is a fix for bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292311 ; we previously
reversed added and deleted elements. Is there still a bug with this
configuration with your models?

Laurent Goubet
Obeo

Patrick K
Re: [EMF Compare] UpdateReference: leftTarget or rightTarget? [message #533022 is a reply to message #532818] Tue, 11 May 2010 22:09 Go to previous message
Patrick Konemann is currently offline Patrick KonemannFriend
Messages: 116
Registered: July 2009
Senior Member
Hi Laurent,

my transformation was retrieving the old and the new target from
UpdateReference.leftTarget and .rightTarget, this caused some confusion.
I fixed that by getting the actual targets directly from the model:
UpdateReference.leftElement.eGet(..) and
UpdateReference.rightElement.eGet(..) ;-)
Now it's working again.

Cheers
Patrick


Am 11.05.2010 11:36, schrieb Laurent Goubet:
> Hi Patrick,
>
> yup, this is a fix for bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=292311 ; we previously
> reversed added and deleted elements. Is there still a bug with this
> configuration with your models?
>
> Laurent Goubet
> Obeo
>
> Patrick Könemann wrote:
>> Hi again,
>>
>> I was running my tests on the latest 3.6M7 release and I found out
>> that the leftTarget and rightTarget switched for updated references.
>> Is that intended or is it a mistake?
>>
>>
>> ReferenceCheck.createUpdatedReferenceOperation(..) in 3.5.1:
>>
>> EObject rightTarget = getMatchedEObject(addedValue); // left: add
>> EObject leftTarget = getMatchedEObject(deletedValue); // right: del
>> // checks if target are defined remotely
>> if (leftTarget == null) {
>> leftTarget = deletedValue; // left: del
>> }
>> if (rightTarget == null) {
>> rightTarget = addedValue; // right: add
>> }
>>
>> ------------------------------
>>
>> ReferenceCheck.createUpdatedReferenceOperation(..) in 3.6M7:
>>
>> EObject leftTarget = getMatchedEObject(addedValue); // left: add ???
>> EObject rightTarget = getMatchedEObject(deletedValue); // right: del ???
>> // checks if target are defined remotely
>> if (leftTarget == null) {
>> leftTarget = deletedValue; // left: del
>> }
>> if (rightTarget == null) {
>> rightTarget = addedValue; // right: add
>> }
>
Re: [EMF Compare] UpdateReference: leftTarget or rightTarget? [message #622875 is a reply to message #532113] Tue, 11 May 2010 09:36 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.
--------------020401020102050508070208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Patrick,

yup, this is a fix for bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292311 ; we previously
reversed added and deleted elements. Is there still a bug with this
configuration with your models?

Laurent Goubet
Obeo

Patrick K
Re: [EMF Compare] UpdateReference: leftTarget or rightTarget? [message #622883 is a reply to message #532818] Tue, 11 May 2010 22:09 Go to previous message
Patrick Konemann is currently offline Patrick KonemannFriend
Messages: 116
Registered: July 2009
Senior Member
Hi Laurent,

my transformation was retrieving the old and the new target from
UpdateReference.leftTarget and .rightTarget, this caused some confusion.
I fixed that by getting the actual targets directly from the model:
UpdateReference.leftElement.eGet(..) and
UpdateReference.rightElement.eGet(..) ;-)
Now it's working again.

Cheers
Patrick


Am 11.05.2010 11:36, schrieb Laurent Goubet:
> Hi Patrick,
>
> yup, this is a fix for bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=292311 ; we previously
> reversed added and deleted elements. Is there still a bug with this
> configuration with your models?
>
> Laurent Goubet
> Obeo
>
> Patrick Könemann wrote:
>> Hi again,
>>
>> I was running my tests on the latest 3.6M7 release and I found out
>> that the leftTarget and rightTarget switched for updated references.
>> Is that intended or is it a mistake?
>>
>>
>> ReferenceCheck.createUpdatedReferenceOperation(..) in 3.5.1:
>>
>> EObject rightTarget = getMatchedEObject(addedValue); // left: add
>> EObject leftTarget = getMatchedEObject(deletedValue); // right: del
>> // checks if target are defined remotely
>> if (leftTarget == null) {
>> leftTarget = deletedValue; // left: del
>> }
>> if (rightTarget == null) {
>> rightTarget = addedValue; // right: add
>> }
>>
>> ------------------------------
>>
>> ReferenceCheck.createUpdatedReferenceOperation(..) in 3.6M7:
>>
>> EObject leftTarget = getMatchedEObject(addedValue); // left: add ???
>> EObject rightTarget = getMatchedEObject(deletedValue); // right: del ???
>> // checks if target are defined remotely
>> if (leftTarget == null) {
>> leftTarget = deletedValue; // left: del
>> }
>> if (rightTarget == null) {
>> rightTarget = addedValue; // right: add
>> }
>
Previous Topic:SOS Please help me: EMF XMI Serialization
Next Topic:how to convert .uml.profile to .ecore
Goto Forum:
  


Current Time: Fri Apr 19 21:42:49 GMT 2024

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

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

Back to the top