Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] what about cross-references of a merged eObject ?
[EMF Compare] what about cross-references of a merged eObject ? [message #137012] Tue, 09 June 2009 11:56 Go to next message
Chetan Kumar is currently offline Chetan KumarFriend
Messages: 44
Registered: July 2009
Member
Hi,

I am doing some trails on EMF Compare with the EMF ExtLibrary example.
When we select an object from the right-side to copy on to the left-side
(using the Compare UI) ... the cross-references of the old object are not
reflected on its copy.

Let's say there are 2 library instances.
Litrary01 (leftside): no books
Library02: has a book which is associated with an author.
When i copy the book from right to left, the author is not included. It
seems fine but infact i feel the merge can be more smart in copying the
cross-references of the copy object to the destination tree.

Does EMF Compare provide such a merge functionality off the shelf ? or
can we use an extension-point to tweak only this part of the merge.

- Chetan Kumar
Re: [EMF Compare] what about cross-references of a merged eObject ? [message #137072 is a reply to message #137012] Tue, 09 June 2009 16:27 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.
--------------010309000601020706030502
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Chetan,

This behavior is intentional. We don't copy cross references to non
existing objects (some people might want it, some others not as all use
cases don't apply to one case or the other).

If you copy the book, its reference towards an author is not copied
alongside it. If you then copy the author, the reference should be
restored as it should.

You can tweak this part of the merge by overriding the existing mergers
(see extension point org.eclipse.emf.compare.diff.mergerprovider ).

Laurent Goubet
Obeo

Chetan Kumar a
Re: [EMF Compare] what about cross-references of a merged eObject ? [message #137248 is a reply to message #137072] Sun, 14 June 2009 18:07 Go to previous message
Chetan Kumar is currently offline Chetan KumarFriend
Messages: 44
Registered: July 2009
Member
Hello Laurent,

Thank you for yer response.
That makes sense.


laurent Goubet wrote:

> Hi Chetan,

> This behavior is intentional. We don't copy cross references to non
> existing objects (some people might want it, some others not as all use
> cases don't apply to one case or the other).

> If you copy the book, its reference towards an author is not copied
> alongside it. If you then copy the author, the reference should be
> restored as it should.

> You can tweak this part of the merge by overriding the existing mergers
> (see extension point org.eclipse.emf.compare.diff.mergerprovider ).

> Laurent Goubet
> Obeo

> Chetan Kumar a écrit :
>> Hi,
>>
>> I am doing some trails on EMF Compare with the EMF ExtLibrary example.
>> When we select an object from the right-side to copy on to the left-side
>> (using the Compare UI) ... the cross-references of the old object are
>> not reflected on its copy.
>>
>> Let's say there are 2 library instances.
>> Litrary01 (leftside): no books
>> Library02: has a book which is associated with an author. When i copy
>> the book from right to left, the author is not included. It seems fine
>> but infact i feel the merge can be more smart in copying the
>> cross-references of the copy object to the destination tree.
>>
>> Does EMF Compare provide such a merge functionality off the shelf ? or
>> can we use an extension-point to tweak only this part of the merge.
>>
>> - Chetan Kumar
>>
>>
Re: [EMF Compare] what about cross-references of a merged eObject ? [message #621005 is a reply to message #137012] Tue, 09 June 2009 16:27 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.
--------------010309000601020706030502
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Chetan,

This behavior is intentional. We don't copy cross references to non
existing objects (some people might want it, some others not as all use
cases don't apply to one case or the other).

If you copy the book, its reference towards an author is not copied
alongside it. If you then copy the author, the reference should be
restored as it should.

You can tweak this part of the merge by overriding the existing mergers
(see extension point org.eclipse.emf.compare.diff.mergerprovider ).

Laurent Goubet
Obeo

Chetan Kumar a
Re: [EMF Compare] what about cross-references of a merged eObject ? [message #621020 is a reply to message #137072] Sun, 14 June 2009 18:07 Go to previous message
Chetan Kumar is currently offline Chetan KumarFriend
Messages: 44
Registered: July 2009
Member
Hello Laurent,

Thank you for yer response.
That makes sense.


laurent Goubet wrote:

> Hi Chetan,

> This behavior is intentional. We don't copy cross references to non
> existing objects (some people might want it, some others not as all use
> cases don't apply to one case or the other).

> If you copy the book, its reference towards an author is not copied
> alongside it. If you then copy the author, the reference should be
> restored as it should.

> You can tweak this part of the merge by overriding the existing mergers
> (see extension point org.eclipse.emf.compare.diff.mergerprovider ).

> Laurent Goubet
> Obeo

> Chetan Kumar a écrit :
>> Hi,
>>
>> I am doing some trails on EMF Compare with the EMF ExtLibrary example.
>> When we select an object from the right-side to copy on to the left-side
>> (using the Compare UI) ... the cross-references of the old object are
>> not reflected on its copy.
>>
>> Let's say there are 2 library instances.
>> Litrary01 (leftside): no books
>> Library02: has a book which is associated with an author. When i copy
>> the book from right to left, the author is not included. It seems fine
>> but infact i feel the merge can be more smart in copying the
>> cross-references of the copy object to the destination tree.
>>
>> Does EMF Compare provide such a merge functionality off the shelf ? or
>> can we use an extension-point to tweak only this part of the merge.
>>
>> - Chetan Kumar
>>
>>
Previous Topic:EEF: When will this link go somewhere: The project has been created. Please visit the project page
Next Topic:EMF Index Project
Goto Forum:
  


Current Time: Wed Feb 28 21:51:24 GMT 2024

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

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

Back to the top