[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.emft] Re: [EMF compare] merging explanation

Hi philipp,

Comments inlined below.

philipp kalb a écrit :
Hi

After some time searching for good model comparison software I came across EMF compare. From what I have seen so far it is really a great piece of work but sadly the documentation could not answer all of my questions. I hope that you can fill these gaps.

I had no problems with matching elements and using the difference engine to get a match- and diffmodel (I used the standalone example and EMF models). I understand how this works but after these steps I want to merge both models. This seems to be a very tricky part.

So my actual question is: what happens when calling MergeService.merge(....) ? Does this really merge the left and the right model (according to the Boolean parameter and the diffs), are these changes also stored in the ResourceSet? Does merge use the diffs and the two models in the resource set?

The in-memory model (either left or right, depending on the boolean param) will be changed according to the merged diff element. One of the two resources (or both if you merge multiple differences in multiple directions) is changed as the result of each call to MergeService.merge(). Note that the changes resulting from a merge are _not_ saved to disk until you save the resource yourself.



Is it possible to store the diff-/matchmodels and apply the changes later, without loading both models but only one of them? Like: Store the snapshot, store the left model; two days later apply the merging on he left model (the right model was deleted). Is this possible?

This isn't possible with the "basic" merging features. You'll have to take a look at the EPatch feature Moritz implemented and commmited for the last release of EMF Compare. Though it isn't fully integrated with the UI yet, you can take a look at the unit tests of the o.e.emf.compare.epatch.tests plugin in order to have an idea as to how to get this to work :).



I hope my questions are not too confusing Thanks for your attention, Best regards Philipp

Cheers,

Laurent Goubet
Obeo

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard