2009/04/15

Acceleo Tip #1

As you may know, EEF uses the Acceleo as generator engine.

if you look at the org.eclipse.emf.eef.codegen plugin, you will see the templates used to generate the source code.

For the first tip on Acceleo, i will just point something about the difference between OCL ( used by Acceleo ) and Java.

If you would like to use the substring(int, int) service, you must know that in OCL, the first character is located at position 1, rather than in position 0 in Java.

So, if you would like to get the first char in Acceleo, you must use that code :
string.substring(1,1).

0 comments:

Post a Comment