How to integrate emf compare with eclispe team support

655 Views Asked by At

I'm using Emf Compare 2 to integrate with team support from eclipse. I follow the instruction from emf compare faq page here but it appears that the content-type id "org.eclipse.emf.compare.ui.contenttype.ModelContentType" is no longer valid. Another way I tried was adding a file-type association between my custom file extension & org.eclipse.emf.ecore.xmi so that emf compare could pick up my file and do the diff automatically. This way, the emf model compare editor shows up but it says there's no differences even though I pretty sure I made some changes to the model. What should I do?

[edit] I checked up on the emf compare module and it turns out that emf compare only contributes the option compare with each other in the "Compare with" menu. Comparing between 2 files are working. So the question left is how to make the option "Compare with" > "latest from repository" work with emf compare editor

1

There are 1 best solutions below

4
On

[Edit : This question led to the discovery of a bug in EMF Compare that prevents it to be used with SVN repositories. Work on this as been planned for the Eclipse Kepler (4.3) release, due the 28th of June.]

(disclaimer : I am part of the EMF Compare developer team, which will explain the "our" and "we" below :p)

As you may have found out, the EMF Compare wiki is pretty much entirely outdated : it holds a lot of info that is only applicable to EMF Compare 1., with only a few parts that have been updated to apply to EMF Compare 2.. This is in our list of priorities, but a few hiccups still need to be fixed w.r.t. the stabilisation of this version before we can switch to properly updating the wiki.

[Edit : The wiki has now been updated with more accurate information, and though there are missing sections, there are no longer any outdated one.]

As for your assumption

emf compare only contributes the option compare with each other in the "Compare with" menu

in fact, EMF Compare does not contribute any option to the workbench or its menus. We're integrated at a lower level. All of the items available from the "compare with" menu are contributed by the repository provider you're using (the CVS, Git, Clearcase... plugin) or the platform itself.

EMF Compare is then called from the platform if the content-type matches, whether you're using compare with > each other or compare with > latest from repository ... or any other does not matter.

With EMF Compare 2, we have yet to re-add a custom content-type, but you can achieve the same result with the org.eclipse.emf.ecore.xmi extension, which you have done.

compare with > latest from repository not showing any difference means that we have failed to retrieve the proper "remote" content for your file. you can switch back to text comparison (from the model compare editor) with the drop-down menu at the center that shows "EMF Compare" : just select "text compare" in there. There, you should see the textual differences between your files : if there are none, then we indeed failed to retrieve the proper remote content (or you actually have no difference between the local and remote files).

If that is the case, do you have anything that shows up in your error log (Window > Show View > Error Log)? What repository are you using, CVS? Is your comparison actually showing textual differences between your files when you disable EMF Compare altogether?