Community
Participate
Working Groups
Up until the latest release users were advised to integrate their models with EMFCompare by extending the 'xmi' or 'emfcompare' content types with file associations to their models. The 'ContentTypeModelInclusionTester' currently only checks the id of the determined file contentType. This works in the default case, however if the user has also registered an own content type for their model, then this kind of check is not sufficient. The content type object provides methods to check for file associations which could also be checked here. However as of the latest release, the users are anyway no longer advised to extend the content types as described above, but instead use the new 'modelInclusionTester' extension point. This extension point was introduced because of shortcomings in the 'old' content type method. To help users migrate we could automatically create 'fileExtensionModelInclusionTester' on the fly for each file association to the 'emfcompare' content type. This approach has the benefit that previous users of EMFCompare are automatically migrated to the latest inclusionTester mechanism and gain its benefits like better integration with EGit out of the box. Also the 'ContentTypeModelInclusionTester' would not have to be changed, however of course it could be changed without interfering with this suggestion. We should describe this mechanism in the documention too.
Short correction: The 'content type' and 'modelInclusionTester' are meant to be used in parallel. So users are advised to use both. With the suggested approach the 'model inclusion' mechanism would work for many users out of the box without configuring it. It this is not wanted, the 'ContentTypeModelInclusionTester' should be extended as described in the op.