Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] Problem when mergin non-containment references without proxies
[EMF Compare] Problem when mergin non-containment references without proxies [message #654218] Mon, 14 February 2011 15:54 Go to next message
Alberto Granado is currently offline Alberto GranadoFriend
Messages: 1
Registered: February 2011
Junior Member
Hello,

I try to merge one file into another and have problem with non-containment references. As I do not want to work with cross-document references I have set the proxy-property to false.
Now I have observed that references to new elements are merged into the file if the referencing element is new, too. But if the referencing element already exists, the reference is broken.
For example:

FILE 1, contains
- Author1
- Book1, referencing to Author1
- Book2, not referencing to any author

FILE 2, contains
- Author2
- Author3
- Book2, referencing to Author2
- Book3, referncing to AUthor3

When merging FILE 2 into FILE 1, the merge of Book3 and Author3 works, i.e., all new elements are added.
The problem is Book2, which references to Author2, but Author2 is not added to FILE 1.

Has anyone an idea how to solve this problem and change the default behaviour of the merge process by implementing as few as possible?

Thanks,
Alberto
Re: [EMF Compare] Problem when mergin non-containment references without proxies [message #657119 is a reply to message #654218] Tue, 01 March 2011 16:12 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Alberto,

first, we are focusing our work on stabilizing the merge for Indigo to avoid
such issues..

In the meantime EMF Compare provides an extension point which you can use to
override the default mergers :

org.eclipse.emf.compare.diff.mergerprovider providing instances of
org.eclipse.emf.compare.diff.merge.IMergerProvider

Which will allow you to provide your own mergers for your own file
extension.



Alberto Granado wrote:

> Hello,
>
> I try to merge one file into another and have problem with non-containment
> references. As I do not want to work with cross-document references I have
> set the proxy-property to false. Now I have observed that references to
> new elements are merged into the file if the referencing element is new,
> too. But if the referencing element already exists, the reference is
> broken. For example:
>
> FILE 1, contains
> - Author1
> - Book1, referencing to Author1
> - Book2, not referencing to any author
>
> FILE 2, contains
> - Author2
> - Author3
> - Book2, referencing to Author2
> - Book3, referncing to AUthor3
>
> When merging FILE 2 into FILE 1, the merge of Book3 and Author3 works,
> i.e., all new elements are added. The problem is Book2, which references
> to Author2, but Author2 is not added to FILE 1.
>
> Has anyone an idea how to solve this problem and change the default
> behaviour of the merge process by implementing as few as possible?
>
> Thanks,
> Alberto


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [EMF Compare] Problem when mergin non-containment references without proxies [message #657318 is a reply to message #657119] Wed, 02 March 2011 12:39 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
By the way, if you open a bugzilla with test cases it would greatly help the
team fix your problem.


Cédric

Cédric Brun wrote:

> Hi Alberto,
>
> first, we are focusing our work on stabilizing the merge for Indigo to
> avoid such issues..
>
> In the meantime EMF Compare provides an extension point which you can use
> to override the default mergers :
>
> org.eclipse.emf.compare.diff.mergerprovider providing instances of
> org.eclipse.emf.compare.diff.merge.IMergerProvider
>
> Which will allow you to provide your own mergers for your own file
> extension.
>
>
>
> Alberto Granado wrote:
>
>> Hello,
>>
>> I try to merge one file into another and have problem with
>> non-containment references. As I do not want to work with cross-document
>> references I have set the proxy-property to false. Now I have observed
>> that references to new elements are merged into the file if the
>> referencing element is new, too. But if the referencing element already
>> exists, the reference is broken. For example:
>>
>> FILE 1, contains
>> - Author1
>> - Book1, referencing to Author1
>> - Book2, not referencing to any author
>>
>> FILE 2, contains
>> - Author2
>> - Author3
>> - Book2, referencing to Author2
>> - Book3, referncing to AUthor3
>>
>> When merging FILE 2 into FILE 1, the merge of Book3 and Author3 works,
>> i.e., all new elements are added. The problem is Book2, which references
>> to Author2, but Author2 is not added to FILE 1.
>>
>> Has anyone an idea how to solve this problem and change the default
>> behaviour of the merge process by implementing as few as possible?
>>
>> Thanks,
>> Alberto


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:[EMF Compare] Definition of rightParent in DiffGroup
Next Topic:Export code generator to Runnable-JAR file
Goto Forum:
  


Current Time: Mon Nov 30 20:44:38 GMT 2020

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

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

Back to the top