Bug 532437 - Improve Default Model Inclusion Strategy
Summary: Improve Default Model Inclusion Strategy
Status: NEW
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Team (show other bugs)
Version: 3.3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-14 06:40 EDT by Stefan Dirix CLA
Modified: 2018-03-14 06:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dirix CLA 2018-03-14 06:40:57 EDT
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.
Comment 1 Stefan Dirix CLA 2018-03-14 06:56:13 EDT
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.