vendredi 25 juin 2010

How to create an Acceleo 2.x generator for composed metamodels

Imagine you have a metamodel that reference other metamodels and you want to create a generator for this metamodel. Let's take an example :

The first metamodel contains an EClass named Object that have a reference package of type EPackage. That create a reference to the ECore metamodel.

First we have to create a template for the first metamodel :

<%
metamodel http://www.obeo.fr/first

import manymetamodels.ecore
%>

<%script type="first.Object" name="default" file="test.txt"%>
Object <%name%> :

<%package.default%>

Then we need to create the template manymetamodels.ecore.mt :

<%
metamodel http://www.eclipse.org/emf/2002/Ecore
%>

<%script type="ecore.EPackage" name="default"%>
EPackage <%name%>.


And that's all. So you just need to create at least one template per metamodel and then inport them according to the way you navigate your metamodels.

jeudi 20 mai 2010

Agility 1.4 is out

Agility is a product based on Eclipse that help migrating code. You can find more details here. This new release comes with several improvements :

- Custom link resolution
- OStore reflective editor
- Export to product parser

There are also bug fixes of course :)

Lien

lundi 12 avril 2010

Acceleo 2.7 is out

There are several improvements and bug fix :

- Profiling now profile compilation of templates. EObjects profiling can
be also disabled. It's very useful when generating from big models.
- EA models import has been improved
- Some improvements have been done on resource caching
- A template extender have been added. It allows to explicitly extends
template from a module. It relay on extension point.
- It's now possible to add custom services as system services. For those
services the import statement is not required.
- The import order error has been changed into a warning.

For a more complete list you can visite the official Acceleo web site.
To download this new version you can use this update site http://www.acceleo.org/update.

mercredi 13 janvier 2010

New succes for Agility

Obeo Agility is a proprietary product edited by Obeo. It's used for code migration. It parses legacy code into a model used for generating code for the targeted technology. We already parse and migrate millions of code lines from many languages (Cobol, Ada, PL1, ...). We finished a project for parsing 5 millions of code lines written in Natural. The goal for this project was not migrating the code, but automating code review. Reports are generated using... Acceleo.