[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.emft] Re: [EMF Compare] MergeService doesn't copy a child non-containment reference

Anyone have any ideas?  We are still stuck.
Thanks!

	--Stephen

Stephen McCants wrote:
Hello Laurent,
Thanks for your reply. I just got back from vacation today, so I just looked at your emails today.

With two differences as you've described, EMF Compare will indeed need two steps for this child reference to be copied : you have an added element A with a reference towards the child C of another added element B. Merging only A will not copy C since B hasn't been copied yet, but merging B subsequently will copy C _and_ restore the link from A to C.

That makes sense, but I think where I may be running into problems is that A and B are in different resources, but the same resource set. We are trying a MatchService.doMatch(A1, A2), so that will only see the changes to A and not to B?


We tried switching to a doResourceSetMatch(...), but that ran into some problems. We got a DiffResourceSet back, but DiffResourceSet.getSubDiffElements() returns an empty array so we have nothing to merge with. Looking into the DiffResourceSet I can see it has a "root" object that is contained by a DifferenceImpl (of some type).

Is there an example of how to merge differences between resource sets?

Thanks for your help!

--Stephen