Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348544

Summary: [EMF Runtime Extensions] OMG XMI files with embedded model content are not recognized as model files
Product: [Automotive] Sphinx Reporter: Stephan Eberle <stephaneberle9>
Component: CoreAssignee: Stephan Eberle <stephaneberle9>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7.0   
Target Milestone: 0.7.0   
Hardware: All   
OS: All   
Whiteboard:

Description Stephan Eberle CLA 2011-06-07 08:19:50 EDT
= Problem description =
XML files with OMG XMI content yield an OMG-defined XMI namespace rather than the model namespace but still may embed model content somewhere inside:
 
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML">
  <uml:Model xmi:id="bdcfbaeb-2732-446b-946e-0656c4efb96c" name="Model">
    ...

For the sake of optimizing content type detection performance, MetaModelDescriptorRegistry#fastGetContentTypeId() considers such files as non-model files and returns IExtendedPlatformConstants.CONTENT_TYPE_ID_NON_MODEL_XML_FILE as content type.

= Resolution proposal =  
Make sure that MetaModelDescriptorRegistry#fastGetContentTypeId() excludes OMG XMI files from the performance optimization, and lets perform a full content type analysis so as to find out if the OMG XMI file is a model file or not.
Comment 1 Stephan Eberle CLA 2011-06-07 08:20:50 EDT
Fixed as proposed in description.
Comment 2 Balazs Grill CLA 2021-07-14 02:17:11 EDT
Mass-closing Resolved tickets