Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » MergeService doesn't copy a child non-containment reference
MergeService doesn't copy a child non-containment reference [message #621285] Thu, 30 July 2009 18:39
Stephen McCants is currently offline Stephen McCantsFriend
Messages: 92
Registered: July 2009
Member
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
Previous Topic:MergeService doesn't copy a child non-containment reference
Next Topic:Is it possible to split an editor window in EMF
Goto Forum:
  


Current Time: Sat Jul 27 04:52:35 GMT 2024

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

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

Back to the top