3

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

Kellindil
  • 4,523
  • 21
  • 20
wakandan
  • 1,099
  • 4
  • 19
  • 27

1 Answers1

5

[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?

Kellindil
  • 4,523
  • 21
  • 20
  • While emf compare editor shows no difference, the textual compare editor did show changes between local v.s remote file. In this case, what should I do? Debugging into the action "compare with latest from repo" shows me that the diff was done on the server side, and the input into emf compare editor was a list of svndiff thingy... – wakandan Jan 03 '13 at 01:51
  • is there any chance you're on irc? Wish I could ask you more questions about emf compare because I'm spending a lot of time working with it :) – wakandan Jan 03 '13 at 02:47
  • @wakandan nope, not on IRC, but the official eclipse forum might be more suited for discussion until we find a real "answer" to this. You have already asked your question there (http://www.eclipse.org/forums/index.php/t/445994/), we can search for a solution through that thread. – Kellindil Jan 03 '13 at 07:56
  • I see that this question is still here pending. The discussion with wakandan on the eclipse forum (link in the comment above) ended up in discovering that EMF Compare cannot be used yet with SVN (bug in the implementation). Should this question be closed? – Kellindil Jan 07 '13 at 21:15