Community
Participate
Working Groups
Build Identifier: M20100909-0800 When EMF model plugins have registered extension points for org.eclipse.core.contenttype.contentTypes/contentType for model resources (in an RCP running EMF 2.6.0/Helios SR1) Comparing two model resources, only shows a text compare not EMFCompare (1.1.1) even though the file extension is defined in the user Preferences for EMFCompare. If the contentType definition in the model is removed EMFCompare works. Reproducible: Always Steps to Reproduce: 1. Create an RCP that uses EMF 2. Register org.eclipse.core.contenttype.contentTypes/contentType extension point for the EMF resource. 3. Launch the RCP, define an EMFCompare user preference for the model file extension and compare two instance of that EMF model resource.
This is (or at least, was) due to Platform/Compare only considering the very first content type it finds when searching for comparison viewers; we have no way to influence this. However, IIRC, they added a drop-down list to allow users to switch from one viewer to the other (Text to EMF in your case) and back on the compare editor that opens up. For the time being, you can try and bind your own content types to EMF Compare's viewers (note that if you do, registering your extension in the preference for EMF Compare is no longer needed) : <extension point="org.eclipse.compare.contentMergeViewers"> <contentTypeBinding contentMergeViewerId="org.eclipse.emf.compare.ui.contentmergeviewer.ModelContentMergeViewer" contentTypeId="my.content.type.id"/> </extension> <extension point="org.eclipse.compare.structureMergeViewers"> <contentTypeBinding structureMergeViewerId="org.eclipse.emf.compare.ui.structuremergeviewer.ModelStructureMergeViewer" contentTypeId="my.content.type.id"/> </extension>
Closing as wontfix as we cannot do any more to influence this.