Just discovered an opensource MDA code generator tool from Obeo called Acceleo.

Features includes integration within Eclipse, native use of EMF, development environment (template editor with syntax highlighting, reflective editor, real time error detection, …), the ability to target any technology as it is based on the use of templates, and compatibility with XMI/UML 2.0 or 1.4, so you could integrate it with Rational Software Modeler, Poseidon or Topcased among others.

In the documentation page, you will find a quickstart guide if you want to catch up with it.

(Via Software architecture and design thoughts)