|[EMFCompare] Not working with resources using content types [message #657393]
||Wed, 02 March 2011 11:34
Originally posted by: jconlon.apache.org|
(previously posted in the EMF maillist by mistake)
When I define extension points for
org.eclipse.core.contenttype.contentTypes/contentType on my Ecore model
resources (in an RCP running EMF 2.6.0/Helios SR1) and then after a
launch of my RCP do a compare on two instances of that model, EMFCompare
(1.1.1) no longer comes up for that resource even though the file
extension is defined in the user Preferences for EMFCompare. What I mean
no longer comes up for that resource is when I do the compare, I just
get a text compare.
If I take out my contentType definition for my Ecore model resources
relaunch the RCP, EMFCompare works.
Is there a work around for this or do I have to go back to file
extension based resources to use EMFCompare?
Thanks for any help/insight,
|Re: [EMFCompare] Not working with resources using content types [message #664935 is a reply to message #657393]
||Tue, 12 April 2011 10:24
| Laurent Goubet
Registered: July 2009
This is due from a long running bug from org.eclipse.compare which ignores all "content types" except for the very first it finds when trying to find the comparison engines, even if said content type is not bound to a comparison viewer. Because of that, EMF Compare had to register a number of content types for EMF comparison.
The only workaround I can think of is to register the compare comparison viewer against your own content type. Something like this in your plugin.xml should do the trick :
class=" org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewerCreator "
id=" org.eclipse.emf.compare.ui.contentmergeviewer.ModelContentMe rgeViewer "/>
contentMergeViewerId=" org.eclipse.emf.compare.ui.contentmergeviewer.ModelContentMe rgeViewer "
contentTypeId="my.content.type"/> <!--change this to reflect your content type's ID-->
Powered by FUDForum
. Page generated in 0.01346 seconds