Community
Participate
Working Groups
= Problem description = MetaModelDescriptorRegistry#fastGetContentTypeId(IFile) supports a performance-optimized approach for determining the content type id of model files by retrieving and leveragint their XML namespaces. It relies on scanning all registered content types and searching for those with a describer being an instance of org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl.Describer and matching the file's XML namespace. The id of the resulting content type - or the of best fitting content type in case there are multiple - is returned as result. This works well so far, but does not take the file's extension into account. Consequently, in cases where the file's XML namespace matches a registered content type but the file's extension doesn't the returned content type id is invalid. = Resolution proposal = * Enhance the performance-optimized content type detection algorithm such that the file's extension is taken into account. * Leverage the file extension to filter out irrelevant content types as early as possible and save some extra processor cycles by not heading into the XML namespace matching part for those.
Fixed as proposed in description.
Mass-closing Resolved tickets