Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Customizing EMF compare 2.0 diff engine
Customizing EMF compare 2.0 diff engine [message #1083077] Fri, 09 August 2013 08:43 Go to next message
Andreas Muelder is currently offline Andreas Muelder
Messages: 71
Registered: July 2011
Member
Hi all,

I use EMF Compare 2.0 with GMF Compare to get a graphical diff of two models. I used the org.eclipse.compare.contentMergeViewers extension point to create a new instance of ...ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer and this works quite well - The Notation Model diff is shown via my graphical editor. Now I want to customize the diffengine to ignore transient attributes, (Shouldn't this be the default compare behavior?) but there is no extension point to hook a custom diff engine into the viewer. I know, that it is possible to change the Diffengine programmatically via EMFcompare.builder().setDiffEngine(..), but how is it possible to change the diffengine when executing the diff from the Eclipse UI menu?

Best regards,

Andreas

Re: Customizing EMF compare 2.0 diff engine [message #1083090 is a reply to message #1083077] Fri, 09 August 2013 09:02 Go to previous message
Mikael Barbero is currently offline Mikael Barbero
Messages: 53
Registered: July 2009
Member
Hi Andreas,

You're true there is no way to provide a custom DiffEngine through extension point. What you can do it to provide a post processor (IPostProcessor) and do your stuff in the method #postDiff(Comparison, Monitor). You can browse the Comparison and remove any difference that you want to ignore.

BTW, you are talking about a transient attribute. They are ignored during the diff process (look at org.eclipse.emf.compare.diff.FeatureFilter.isIgnoredAttribute(EAttribute) and org.eclipse.emf.compare.diff.FeatureFilter.isIgnoredReference(Match, EReference)) so it looks like bug. Could you give us more detail about your case? Thank you.


Best regards,

Mikael Barbero
Obeo
Previous Topic:How to load an EMFText model in a standalone Java application
Next Topic:How to get DOM Node to EMF Object?
Goto Forum:
  


Current Time: Sun Aug 31 02:44:55 EDT 2014

Powered by FUDForum. Page generated in 0.01645 seconds