[EMF Compare] MergeService doesn't copy a child non-containment reference [message #621288] |
Thu, 30 July 2009 20:05 |
Stephen McCants Messages: 92 Registered: July 2009 |
Member |
|
|
Resending with proper subject line.
--Stephen
-------- Original Message --------
Subject: MergeService doesn't copy a child non-containment reference
Date: Thu, 30 Jul 2009 13:39:39 -0500
From: Stephen McCants <stephenmccants@yahoo.com>
Organization: EclipseCorner
Newsgroups: eclipse.technology.emft
Hello,
We have a model and are doing the match, diff and merge. Everything is working correctly, except
the merge fails to merge in one object.
The diff correctly identifies an object that has been added to the model. That added object has a
non-containment reference to another object. When we do the merge, it correctly copies the added
object to the left model (from the right model), but the non-containment reference is never set.
Instead of being set, it is null.
We traced through the copy code and it is trying to copy it in
EMFComapreEObjectCopier.copyReferences() by calling copyReference(). However, the call to
copyReference() does nothing because we haven't copied it before (so it isn't returned by get()) and
the mergeLinkedDiff() function returns false.
The reason mergeLinkedDiff() returns false is because the reference being copied is a child of an
unmatched element and not an unmatched element itself.
We were going to try to override the Copier and make some adjustments to work around this problem,
but there seems to be no way to do that (MergeService is final and MergeService.getCopier() always
uses the EMFCompareEObjectCopier()).
Any ideas on what we can do to get the MergeService to copy the non-containment reference over?
Thanks!
--Stephen
|
|
|
Powered by
FUDForum. Page generated in 0.03180 seconds