Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Acceleo/New And Noteworthy

Luna Release

Acceleo 3.5.0

  • Add the new OCL interpreter
  • Improve the maven support
  • Add a maven launcher to generate files during a maven build
  • Move to Java 6
  • Host the Acceleo artifacts on repo.eclipse.org
  • Deprecate outdated components

Kepler Release

Acceleo 3.4.0

  • Stabilization of the Acceleo editor and engine

Q1 2013

Acceleo 3.3.2

  • Stabilization of the Acceleo editor and engine

Juno Release

Acceleo 3.3.0

  • Stabilization
  • Improved maven support
  • Improved support for meta-models in the workspace
  • New documentation
  • New operations in the non-standard library
  • New UML to Java example for Juno

Q2 2012 Release

Acceleo 3.2.1

Improved compilation

Improved the speed and the stability of the compilation.

Dynamic meta-model

Improved support for generators using dynamic meta-models.

End of 2011 Release

Acceleo 3.2.0

Interpreter view

The interpreter view allows the user to enter Acceleo expressions and to execute them without the need to launch a generation.

The interpreter view

This new view is available directly in the Acceleo perspective.

Performances

Performances improvements in the compilation and the tooling.


JRE selection in the new project wizard

When creating a new Acceleo project, you can now choose the JRE of your choice.

The new project wizard

Improved compilation

The compilation has been improved and as such compiled Acceleo modules (".emtl" files) are now way smaller.

Indigo Release

Acceleo 3.1.1

Bug fixes

Acceleo 3.1.0

Language improvements

  • Support for documentation for templates, queries and modules.
TemplateDocumentation.png
  • Support for TODO and FIXME
AcceleoTodo.png

Tooling improvements

  • Improved real time error detections with new errors detected and warning support.
AcceleoDeprecated.png
  • Brand new wizard for the creation of new projects and new modules.
AcceleoWizard.png
  • Documentation in completion and hover
AcceleoDocumentation.png
  • New outline view
AcceleoOutline.png
  • Improved support for metamodels that have not been deployed in a plugin.
  • New refactoring options

Ant and Maven support

The compilation and the generation can be launched with dedicated Ant tasks and now Acceleo can generated tycho based pom.xml file to build an Acceleo project with maven.

New serialization option

Support of binary resource serialization for Acceleo modules.

AcceleoBinaryResource.png

Acceleo 3.1 is compatible with Eclipse 3.4 (Ganymede), Eclipse 3.5 (Galileo), Eclipse 3.6 (Helios) and Eclipse 3.7 (Indigo).

Helios Release

Acceleo 3.0.2

Improved traceability and bug fixes.

Acceleo 3.0.1

Bug fixes.

Acceleo 3.0

What's new in Acceleo 3.0?

Acceleo 3.0 is on its way out. The complete list of improvements and bug fixes that have been implemented in this version since the last stable release (version 0.8.1, see this post for explanation on this branch's version numbering) is humongous; following is the list of the most important ones. I may be succinct on the description of some of these, but you can get a full explanation of all of them in the Acceleo documentation, namely the User Guide.

Compatibility and upgrading

  • Acceleo 3.0 is compatible with the three latest releases of Eclipse; Eclipse 3.4 (Ganymede), Eclipse 3.5 (Galileo) and Eclipse 3.6 (Helios). However, there are some limitations to this compatibility we maintain due to the changes that were implemented in OCL since then. For one, Acceleo modules that compile in Helios may or may not compile in Galileo and Ganymede (this will depend on the OCL features you make use of). However, Acceleo modules that compile in a given version will always compile in the subsequent Eclipse releases. Likewise, a module that has been compiled in Helios may be launched in Ganymede regardless of whether it would compile or not in that version, as our runtime shouldn't suffer from OCL breakages and improvements. All information about the compatibility will be maintained on the wiki.
  • We provide migration facilities for those of you that own Acceleo 2 templates. Specifically, we allow for the automatic migration of Acceleo 2 generation projects to Acceleo 3 projects. The automatic migration takes care of everything that could possibly be automated, leaving for you to fix no more than the Acceleo 2 features that don't have an identified mapping to Acceleo 3, or those few features that require a human hand to convert intelligently. The team is at your disposal for help if there still remains things you don't know how to convert to Acceleo 3 on the usual communication channels : the M2T newsgroup, mails, comments on this blog...

Tooling improvements

New views have been introduced to help you on several aspects of the generation cycles : module definition, launching, debugging. I'll detail each of these views one after the other.

  • First of all, the Result view allows you to get feedback on the traceability information we could retrieve during the evaluation of your modules. As long as this view has been opened, Acceleo will record every bit of information it can to synchronize your generated text with the generation module and source model. Ever wondered why such or such portion of text has been generated one way or another? What part of your generation module has generated the name of such or such method? From which element of your model has been generated such or such import? This is the view you can use to retrieve these pieces of information.
    Acceleo result view
  • Next comes the Overrides view, which can be used to easily create templates or modules overriding other that are present in your instance of Eclipse. It will display every single module located either in your installed plug-ins or your workspace. All of these can be browsed down to the template level and a check box allows you to select those you wish to override. Once selected, you simply have to use the content assistant in the Acceleo Editor (CTRL+SPACE by default) and validate selected overrides for all of the overriding templates to be added to your module.
    Acceleo overrides view
  • Last but not least, the Generation Patterns view has been introduced to help you implement behavior for an interface/class and all (or a subset of) its subtypes. For example, let's say you wish to implement a template named javaName which will generate the name of any classifier. This template will need some default behavior for interfaces and specific behavior for some classifiers. Open the Generation Patterns view, tick [template] for all selected types in its top part, and all of the types you wish to generate a template for in its bottom part. Once done, the content assist in the Acceleo editor will give you the choice [template] for all selected types which yo just have to choose in order to generate all of the templates you asked for. Now that you no longer risk forgetting one or more subtypes, it is left to your discretion to implement the behavior for each of them.
    Acceleo generation patterns
  • Acceleo now provides a built-in profiler that can be used to keep track of evaluations and identify (and, hopefully, fix) bottlenecks in your generation process. The profiler is accessible through a right click on the module which execution you need to profile and the menu item Profile As => Acceleo Application.
    Acceleo profiling file
  • The Acceleo debugger now provides you with the list of available variables at a given point in the evaluation process, along with the values of these variables for a given stack frame. Moreover, the displayed stack frames now represent Acceleo module element corresponding to your current expression stack. As for the previous release, debugging templates only requires you to set breakpoints in the Acceleo modules as you would usually with Eclipse : open an editor, double click in the left margin on the line you wish the breakpoint to be set, and launch the generation through the menu Debug As => Launch Acceleo Application.
    Acceleo debug
  • Whenever possible, the warnings and errors Acceleo logs when an evaluation fails now sport the expression stack (with the lines they're at in the module files) instead of a stack trace corresponding to the Java code that was being executed at the time. This will allow for way easier debugging that ever before.

Editor Improvements

Apart from the performance improvements and minor bug fixes, the Acceleo module editor now provides refactoring actions and quick fixes.

  • First of all, you can now use the “usual” shortcut ALT+SHIFT+R to rename either modules, templates, queries, variables, ... in a coherent manner. This very same action can be accessed from right-clicking and selecting Refactor => Rename. The interface will allow you to preview the changes before validating them.
    Acceleo rename preview
  • Portions of the module elements can be extracted as new templates through right-clicking and selecting Refactor => Extract Template (or simply using the shortcut ALT+SHIFT+T). Do note, however, that the selected text needs to be consistent. You cannot randomly select text that spans blocks of code and expect an adequate result.
  • The module editor now highlights all occurrences of the selected element when you click on it. For exemple if you place the cursor on the name of a template, all invocations of this template will be highlighted and markers will appear on the right ruler of the editor to indicate them.
  • Acceleo now provide quick fixes for some of the syntax errors detected in the editor, notably the possibility to create template or queries of a corresponding name.
    Acceleo quick fixes
  • It is recommended to use a bottom-up approach when developing generators ; Acceleo now eases this process by allowing you to initialize the content of a generation module with an example, and offering specific actions to transform these examples (static text) in dynamic OCL expressions. For example, changing all occurrences of MyClass to [c.name.toUpperFirst()/] in a single click.

Improvements and simplifications of the language

  • The MTL specification defines a standard library that offers a set of utility operations; in addition, Acceleo provides a non standard library to provide operations that greatly simplify the language and allow you to write more concise expressions, but are not part of the specification. This library has seen many additions since the 0.8 version, with things like Collections::sep(String) to insert a separator in-between every element contained by a collection, String::matches(String) to check whether a given String matches a regular expression, Collection::filter(Type) that can be used to filter out of a collection all elements that are not instances of a given type, Collection::reverse() to reverse the content of a given Collection... Take a look at the Acceleo documentation for a full reference of both standard and non standard library, along with the reference of the OCL standard library.
  • Acceleo allows you to alter the build mode, either Strict or Lax MTL compliance. Strict compliance meaning you'll get a warning for each use of a “non standard” operation.
    Acceleo compiler compliance
  • Those of you that are familiar with the 2.x stream of Acceleo will be pleased to know that Acceleo 3 now provides the same post-processing facilities as its ancestor through the addition of a post directive on templates. Which allows for the modification of the text generated by a template “after generation”. For example, post(trim()) allows you to properly indent the content of the template while still leaving you the possibility to trim all unnecessary white spaces from the generated text.
    Acceleo template posttreatment
  • The “+” operator can now be used whenever one of the operands is a String for concatenation, in order to avoid the verbose concat(String) OCL offers.
  • You can now use properties files to customize your generations through the addition of 4 variants of a getProperty operation in Acceleo 3. Once again, the operation reference can be looked at for the description of those services.
  • We made use of the facilities OCL provides in order to further simplify the navigation language : iterators of our [for] blocks are no longer mandatory (they'll be implicitly declared if needed and self can be used in their stead), you no longer need qualified names for your types when the metamodel is declared on the module header (or if it can be inferred from another of the declared metamodels), casting through oclAsType for all redundant expressions is no longer necessary...
  • For those expressions where OCL doesn't allow us to simplify the language, we added non standard operations. For example, sequence->select(oclIsKindOf(Type)).oclAsType(Type) is obviously redundant, but OCL doesn't allow for this expression not to define the explicit cast. In Acceleo, you can now write sequence->filter(Type) instead (see also the post on this specific issue).
  • Acceleo now allows for control characters (\n, \t, \'...) in OCL expressions.
  • Acceleo [for] blocks now declare an implicit “i” variable that can be used to retrieve the iteration count. For example, [for (Sequence{4, 5, 6})][i/], [/for] will generate 1, 2, 3.

Documentation

The Acceleo documentation is complete and can be accessed from the integrated Eclipse Help through Help => Help Contents, in the Acceleo Model To Text category. We provide everything you need in order to get started with Acceleo; quick start, tutorial, user guide... and the full reference of OCL standard library and Acceleo standard and non standard libraries complete with explanations of the operations and examples.

Galileo Release

Acceleo 0.8

First public release of Acceleo, implementation of the OMG specification MOF Model to Text Transformation Language

Code Generation

Acceleo can be used to generate code from any metamodel, be it Ecore, UML or a custom DSL, as long as it can be read through EMF.

Acceleo - generating with multiple metamodels

Tooling

  • Acceleo is provided along with a powerful editor providing all usual features : code completion, syntax higlighting, code navigation, syntax error detection and marking, ...
    Acceleo template editor
  • Both run and debug modes are supported when launching generation modules.
  • Acceleo provides facilities to automatically generate java code that can be called to launch generation modules. An "UI" module can also be automatically generated to add a popup menu action that users can use to launch given generation modules on given model files.
  • Allows the initialization of templates from examples.

Encoding

Acceleo supports a special tag to allow users to define the encoding in which their templates should be read. Note that the generation isn't affected by this.

Dynamic templates

Acceleo supports dynamic overrides of generation templates : if templates overriding one of the currently evaluated module's templates are present either in the workspace or installed bundles, they'll be taken into account instead of said templates for the evaluation. This functionnality can be leveraged through extension points.

Custom code

Acceleo supports both the specification's "[protected]" blocks and the use of "@generated" annotations (within java code only) to prevent overriding part or all of the target files if they exist.
Acceleo protected block
Associated generation

Standalone

Acceleo fully supports standalone generation with only a minimal set of plugins required in the classpath; Mainly EMF and Eclipse core.



Acceleo Portal
Project Project · Installation
Features Acceleo Features · Runtime · Acceleo editor · Views & Perspective · Interpreter · Maven
User documentation Getting Started · User Guide · Acceleo operations reference · OCL operations reference · Text Production Rules · Migration From Acceleo 2.x · Best Practices · Videos · FAQ
Developer documentation Source code · How to contribute · Compatibility · MOFM2T specification · OCL specification
Community Professional Support · Report a bug

Back to the top