Acceleo 2.0.0 - New and Noteworthy

Acceleo 2 is coming! This release brings in many changes, always aiming at a pragmatic and efficient use of model driven engineering.

Module repository

The Acceleo project now hosts a set of open-source generators targeting many great technologies such as JEE, CSharp, Php but also Python.

Enhanced syntax

Acceleo can now to directly have selection predicates without using the select(..) service. Predicates are enclosed with brackets [..] in a similar way of XPath.

Filtering with Acceleo 1
Figure :Filtering with Acceleo 1

Filtering with Acceleo 2
Figure :Filtering with Acceleo 2

In order to explicit some cases where scripts/services/metamodel elements have the same name, an optional prefix is now available.

It may be either one the followings : script, metamodel or service.

Using the prefix
Figure :Using the prefix service

Standard java services may now become deprecated.

Deprecated services
Figure :Deprecated services

The current service may now be given parameters in order to navigate in the transformation execution tree. This solves a frequent use case in an elegant way.

Using current(value)
Figure :Using current( value)
Generated code
Figure :Generated code

The system services have been refactored in order to get a better consistancy than before, it causes a number of them to become deprecated:

  • cast() who had the same behavior than filter()
  • nPut() replaced by put()
  • nGet() replaced by get()
  • nPop() replaced by pop()
  • nPeek() replaced by peek()
  • minimize() replaced by nMinimize()
  • sort() replaced by nSort()
  • until()
  • sepStr()
  • select() and delete() replaced by the predicates [..]

The general rule is that services on lists or collections now have a name starting withn.

Forward compatibility is guaranteed, services are marked as deprecated but will only be dropped for the next major version : Acceleo 3.

A few new services :

  • nReverse() reverses a list
  • adapt("..") converts anything to an Acceleo primitive type, the parameter can be one of :"String", "int", "boolean", "double", "List", "EObject", "ENode" or "ENodeList".
  • nGet() may now have two parameters in order to get a sublist from a list

Editing environment enhancements

Acceleo had many core changes, yet user experience has still been improved, especially with keyboard shortcuts:

  • F5 : reloads a template in the reflective editor.
  • F3 : opens a script definition in the template editor.
  • CTRL+MAJ+C : comments/uncomments a bloc in the template editor.

Templates compilation time has been greatly reduced.

Completion assistant is now case-insensitive.

Case-insensitive completion
Figure :Case-insensitive completion

XMl Compatibility

Thanks to the XSD component Acceleo may directly use XML files and generate text from it.

Generating from an XML file
Figure :Generating from an XML file

Launching file improvements

The .chain files used to setup and launch a generation have evolved in order to provide new possibilities:

.chain file evolutions
Figure :.chain file evolutions

More specifically :

  • One may now specify a set of models using the ModelSet element. This is really useful when one wants to generate text from many XML files.
  • A new attribute chainPath in the sub-chains call. Using this attribute the called chain may be stored in the workspace or in the runtime as a plugin.
  • One may now use custom actions called during the generation process (for instance to zip a set of files or to launch a deployement ...)
  • A new file type : CustomFile used as parameter for CustomActions

Export as plugin

Acceleo generators projects may now be deployed as Eclipse Plug-In. This means it's now possible to manage dependencies and update Acceleo modules the same way Eclipse does for Plug-Ins - using the update manager.

Export generator project as plugin
Figure :Export generator project as plugin

Calling a .chain file stored in a plugin
Figure :Calling a .chain file stored in a plugin

With a few settings Acceleo is now able to initialize a generation project for a given target.

Choosing a generation module
Figure :Choosing a generation module

Generation module parameters
Figure :Generation module parameters

Various enhancements

A lot of work has been done on performances, the generation process has been fastened by at least 30%

Acceleo 2.0.0 fix a few bugs :

306665Exception with "Resource /hometu does not exist." occurs when convert ArgoUML / UML 1.415/02/2007
306841Unable to acces uml13 multiplicities ranges 27/03/2007
306780sort doesn't minimize its output14/03/2007
306572Generation stops when two resource have the same name with a different case17/01/2007
306607problems with imports and script included into a select29/01/2007
306821Problem of slowness in the templates compilation22/03/2007
306568problems with Acceleo 1.2 and Java 1.415/01/2007
306700ClassCastException with the ENode class23/02/2007
306720Reflective editor on Ecore model require a .genmodel file01/03/2007
306710Java services don't work with List as owner28/02/2007
306571UML 1.4 : problem accessing the parent of a Generalization17/01/2007
306883Build as plugin 03/04/2007
306884XML/XSD minimal compatibility 03/04/2007
306885Completion and compilation with 'select' service 03/04/2007
306596EMF conversion ignores special characters25/01/2007