How to convert XSD to Ecore (EMF)

That's what worked for me:

  • New -> Project...
  • Eclipse Modeling Framework -> EMF Project
  • Model Importers: XML Schema
  • Model URIs: [Select xsd-File]

To revalidate the .ecore-File when xsd has changed:

  • Right-Click on .genmodel-File
  • Reload...

If you do not want to create a new MDT project every time you want to import a schema as ECore model then there is also another way to do this:

  • New -> EMF Generator Model (in "Eclipse Modelling Framework")
  • Press Next
  • Select folder and specify filename (has to have the extension "genmodel")
  • Press Next
  • Select "XML Schema" as model importer
  • Press Next
  • Select URI to your XSD
  • (Optionally, select tick box "Create XML Schema to Ecore Map" if you want to generate a .xsd2ecore map file)
  • Press Next
  • Select all desired root packages
  • Press Finish