This tutorial demonstrated using Acceleo to generate JavaScript from an EMF model instance. A simple meta-model was created for a simple web application. Acceleo modules (text generators) where created to convert an instance of the meta-model into JavaScript code for a web application.
Acceleo was also used to generate an Eclipse editor to be used by end-users to create instances of the meta-model and generate the web application.
While the example only generated JavaScript, Acceleo is a model to text (M2T) generator, and can output to any text-based format (e.g., Java, XML, etc.) In addition to instances of meta-models, Acceleo can transform "regular" models too.
Acceleo has an impressive tool set for developing modules and editors, including:
- a rich editor that includes excellent content assist, navigation, refactoring, etc.
- a debugger for stepping through generation steps
- a profiler for improving performance when generating large models or performing complicated transformations
- a view for identifying which lines in a generator generated a particular section of output text
- generation of customisable editors that can be deployed to users (or other developers) for editing an instance of your model and generating text or code using your modules
Acceleo also has the ability to specify regions of generated text that shouldn't be replaced when regenerated. This is necessary for those special cases where a generic generator simply won't work.
No comments:
Post a Comment