Saturday, December 18, 2010

What You Need to Start Model-to-Text Transformation with Xpand

Setup your Model-driven Development Environment:
  1. Get Eclipse IDE, Modeling distribution.
  2. Install Xpand to Eclipse IDE
  3. Install MWE to Eclipse IDE
  4. Ecore Tools is optional, but it helps you to create your metamodel (Ecore model) using a nicer visual diagram editor.

Now you can create your project:
  1. Create your metamodel (.ecore file). Better just use Ecore Tools, and create .ecorediag diagram alongside .ecore file.
  2. Create a .genmodel from your metamodel.
  3. Generate your Model package and classes from the .genmodel.
  4. Create a sample model (instance).
  5. Open the .ecore model file, right click on a EClass and choose Create Dynamic Instance.
  6. Create a Xpand template.
  7. Create a MWE workflow file (.mwe).
  8. Add necessary plugin dependencies to the MANIFEST.MF.
Now you can run the workflow.

The steps above the high-level steps. It sounds complicated and indeed it can be confusing at first. (the reason why I'm blogging this here is so that I won't get confused in the future) ;-)

If you want the simplest thing, use the New Xpand Project Wizard - Sample Xpand Project and it'll provide up a ready-to-use Ecore+Xpand+MWE  setup for you. :-)

Note: MWE and Xpand package names has changed since moved from openArchitectureWare to Eclipse Modeling Framework umbrella, so be aware of this when following older tutorials.

3 comments:

  1. thanks a lot for sharing. i was looking for something like that.

    Buy Runescape Gold

    Cheap D3 Gold

    ReplyDelete
  2. Excellent evening. Nice short article. All this seems wonderful
    Guild Wars 2 Gems
    GW2 Cd key

    ReplyDelete
  3. I am so glad this particular web point performs along with your report truly reduced the problem. Normally takes an individual high on that house assistance an individual.
    xiaomi mi 4i review
    buy Meizu Metal
    meizu mx5

    ReplyDelete