The "depth" to a content type matters when deciding the best one #310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although not obviously documented, the "depth" of a content type (how many base-types there are, recursively) matters to choosing which content type to use. See the code in platform that has been like this since ~2005.
Therefore, change the definition of cxxSource to make it the same depth as the other types in CDT.
This solves the practical case where TM4E provides content types for C++ file types, but the priority there is low, but because to the lesser depth it takes priority.
platform: https://github.com/eclipse-platform/eclipse.platform/blob/9839c18f52687db6f949bdb56a59a5d20cd7c938/runtime/bundles/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentTypeCatalog.java#L43-L60
tm4e: https://github.com/eclipse/tm4e/blob/99a5df037be1e3114f7f88115f46c34b1d27a297/org.eclipse.tm4e.language_pack/plugin.xml#L69
Fixes eclipse/tm4e#499