Acceleo 2.2.0 - New and Noteworthy


As planned the eagerly awaited Acceleo 2.2.0 has been released. This version brings many changes in the editors, may now be localized and support specific encodings in the generation templates.

You may have a look on the Acceleo 2.0.0 and Acceleo 2.1.0 new and noteworthy pages.

Plugins localization

The Acceleo core plugins are now using the localization features of Eclipse. That means it is now possible to translate Acceleo for a given language.

Only the french localization has been done yet, do not hesitate to contact the team if you want to translate Acceleo for your own dialect !

.chain editor in French
Figure :.chain Editor in French

Syntax highlighting enhancements

A debate about the template editor colors took place on thedevelopment mailling-list . After a vote the decision has been taken to change them in order to improve the readability of the templates.

Colors before Acceleo 2.2.x
Figure :Acceleo 2.1.x colors
Acceleo 2.2 colors
Figure :Acceleo 2.2.0 colors

Template editor

The template editor has a few more editing assists : auto-completion on template header and block matching higlighting.

Completion en en-tête
Figure :Header auto-completion
Correspondance des blocks
Figure :block matching

Template encoding support

Acceleo is now able to load a template using a specific encoding. That means you’ll never have troubles anymore working with special characters in templates and using them with different operating systems. Previously Acceleo was only using the current JVM encoding so any template with “é”, or “à” created on Windows would not work on Linux or Mac.

Beware, it is, most of the time, a bad idea not to use ASCII for template but sometime you don't have choice. For instance the following template uses utf-8:

Template en utf-8
Figure :utf-8 template

This one ISO-8859-1 :

ISO-8859-1 template
Figure :ISO-8859-1 template

And the last one, in ASCII, import the previous ones:

ASCII template
Figure :ASCII template

The generated text uses the JVM-specified encoding, then for the following result, everything has been encoded in UTF-8 .

UTF-8 generated text
Figure : UTF-8 generated text

Of course the encoding specification is optional and using a wrong one fire an error.

Template with non-existent encoding
Figure :Template with non-existent encoding

Generic script

Another feature is support for the EObject type. EObject is the common object of every EMF based model, it’s a kind of java.lang.Object but for model elements, sometimes it is usefull to define a template on any kind of type.

It’s now possible, with any metamodel you will be able to define templates on the EObject type which mean you’ll be able to call this template on any object.

Template générique
Figure :Generic template

Updated documentations

The english guides, tutorials and documentation have been updated and corrected.

JEE Module

Spring
  • New Spring support
    • Handle Hibernate DAO's and unit tests
    • Handle service layer with transactional aspect oriented support + unit testing.
    • Handle business services publication using SOAP (XFire) + unit-testing
  •  
  • Enhancements and fixes in the Hibernate DAO generation
  • Demo wizards have been moved in the "Examples/Acceleo" category
  • New demo for Spring
  • Velocity UI support (Experimental)

PHP Module

PHP
  • Handle subclassing in the DAO and DTO layer (one table for each class) Abstract classes are not supported (yet)
  • Handle Enumerations, table creation and filling
  • Generate phpunit unit tests
  • Stereotypes are used (keywords were used before)
  • Common base classes for the DAO and DTO layers.

Ecore2Python Module

Python
  • Generate code from EOperation
  • Documentation eAnnotations are used to complete the pydoc
  • A Factory for the domain elements is now generated
  • Generated classes share a common base class
  • Fixes in the sub-packages generation

WISS Module

WISSS
  • Specific entity/relational modeling
  • Generates persistence layer for PHP using the Zend Framework


Export a generator module to an EMF model

First step toward Acceleo 3.0, this release provides a generator module export to an EMF model you may then re-use as a basis for a generator.

Assistant d'export en modèle EMF
Figure :Export as EMF model wizard

Bugfixes

The following bug has been fixed:

308139 eAllContents("Type") returns a wrong result when the metamodel has multiple inheritance
307391 Syntax error when you use parenthesis with RequestService [ ]
308032 The call to the "args" service modify the value of the argument
307328 The JAR Custom Action makes error
306476 Reflective Editor : Ctrl+A Ctrl+C is not working on generated text
307408 Acceleo cannot resolve call to EObject typed scripts on UML modelElements
306891 Change the icons and the images of the wizards
307550 ClassCastException when no category provided in module launcher's plugin.xml
307383 Unexpected result from XPath preceding() service
307296 [2.1.0] SAXParseExceptions in Help
307309 Unresolved call while using a service that has a Collection parameter
307339 Java heap space exception with many Java services in an Acceleo project
307375 probléme sur atribut length