Adding an embedded model connector

To create an new embedded connector:

  1. Go the src source folder of the plugin which defines the metamodel you want to add a connector. (e.g. com.sodius.mdw.example.library/src)

  2. Open the metamodels.xml file.
  3. Add a modelReader (e.g. MyReader) or a modelWriter as a child of the a metamodel XML element.

    Here is a model reader example:

    <?xml version=

    "1.0"

    encoding=

    "UTF-8"

    ?

    > <metamodel id=

    "library"

    name=

    "Library"

    version=

    "1.0"

    presentationName=

    "Library 1.0"

    > <provider class=

    "com.sodius.mdw.corext.model.emf.EMFMetamodelProvider"

    > <property name=

    "epackage"

    value=

    "com.sodius.mdw.metamodel.library.LibraryPackage"

    /> </provider> <modelReader name=

    "MyReader2"

    uriType=

    "file"

    class=

    "com.sodius.mdw.example.library.MyReader"

    > <fileExtension description=

    "XML files"

    extension=

    "xml"

    /> </modelReader>

    ...

  4. Save the metamodels.xml file.
  5. Define the connector implementation using a Java class.

Related reference
Connector XML file format