Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] MergeService doesn't copy a child non-containment reference
[EMF Compare] MergeService doesn't copy a child non-containment reference [message #621288] Thu, 30 July 2009 20:05
Stephen McCants is currently offline Stephen McCantsFriend
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
Previous Topic:Is it possible to split an editor window in EMF
Next Topic:[EMF Index] Re: A proposal for improving the WorkspaceSynchronizer.
Goto Forum:
  


Current Time: Tue Dec 10 05:27:58 GMT 2024

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

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

Back to the top