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.

No comments:

Post a Comment

 
Copyright 2009 Spring vs Java EE Web Dev. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan