Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337916 - EMFCompare does not work with resources that use content types
Summary: EMFCompare does not work with resources that use content types
Status: CLOSED WONTFIX
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-22 17:28 EST by John Conlon CLA
Modified: 2011-05-03 08:30 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Conlon CLA 2011-02-22 17:28:49 EST
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.
Comment 1 Laurent Goubet CLA 2011-05-03 08:30:04 EDT
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>
Comment 2 Laurent Goubet CLA 2011-05-03 08:30:37 EDT
Closing as wontfix as we cannot do any more to influence this.