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 |
Alberto Granado 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 |
Cedric Brun 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 |
Cedric Brun 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.
|
|
|
Goto Forum:
Current Time: Thu Sep 19 14:29:27 GMT 2024
Powered by FUDForum. Page generated in 0.04324 seconds
|