MPS export to Eclipse EMF
Over the last couple of days I have created an EMF export facility for MPS. You can export ecore files from language definitions, as well as XMI files from the instance models.
The export is integrated into the MPS generator facilities. Here is how you use it:
To export an ecore meta model, take any concept declaration in your language of choice and add an ecore export specification annotation (there is an intention for that). In this annotation, you have to specify the name of the to-be-created EPackage, the nsURI as well as the (absolute) path to where the file should be stored. The file's name will correspond to the name of the EPackage. Once you (re-)generate your language, the ecore file will automatically be written as well.
To export an XMI file, select any root element you want to export into an XMI file (currently it's one XMI file per root node). Once again, you create an annotation via an intention. Note that you can only annotate root nodes whose concept has an ecore export specification. In the annotation, you specify path and name, and when you generate the model, the XMI file is written as well.
Notice how nicely one can use the EMF export facility with any language (incl the meta language used for language definition) because of the annotation facility.
Note that the export currently doesn't yet support enumerations (I will work on that...).
You can find the code at
https://github.com/markusvoelter/MPSEMFIntegration.