Transform the objects to be compared before the comparison operation [message #1653710] |
Fri, 06 March 2015 10:53 |
Francois Cabrol Messages: 32 Registered: January 2015 |
Member |
|
|
Hi everyone,
I am currently developing an EMF model edition application heavily relying on Sirius. I would like to make object comparison available to users. I have noticed that when I include the EMF Compare features in my final product, new comparison commands become available in the contextual menus available from SIrius views (Compare Each Other <EObject> in Dialog and Compare Each Other <EObject> in Editor). To be frank, I have no clue of how these commands are contributed. Plus, this Sirius/EMF Compare integration does not seem to be officially supported by Sirius developers.
My problem is that the Comparison view displays differences between the graphical representations of objects (e.g Sirius tree items, Sirius table lines, themselves being instances of EObject) whereas I would need the differences between objects from my model (the semantic model).
So I am wondering if a pre-processing extension point exists in EMF Compare, which would enable me to provide an adapter converting Sirius graphical objects to semantic objects, so that the comparison is performed between the semantic objects directly.
Sorry in advance for my question, for I am new to EMF Compare and I have not browsed the documentation in depth.
Thanks in advance for your help,
François
[Updated on: Mon, 09 March 2015 15:48] Report message to a moderator
|
|
|
Re: Transform the objects to be compared before the comparison operation [message #1693650 is a reply to message #1653710] |
Mon, 27 April 2015 09:33 |
|
Hi François,
There is no such extension point, and the two "compare with ..." options you see are custom contributions of the EMF Compare project, with no relation to Team's "regular" contributions (the "compare with...." options on files). The are meant to act on the selected objects, which in your case are Sirius/GMF edit parts.
You could however contribute the same kind of action but coerce the graphical views down to their semantic element in your custom actions. You could look at how org.eclipse.emf.compare.ide.ui.internal.handler.CompareInDialog and org.eclipse.emf.compare.ide.ui.internal.handler.CompareInNewEditor are contributed and do something similar.
|
|
|
Powered by
FUDForum. Page generated in 0.03321 seconds