O'Reilly logo

Professional Cairngorm™ by Jeremy Wischusen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

27.7. Customizing the Templates

The classes generated in the previous examples are done so by means of JET (Java Emitter Templates), which is part of the EMF (Eclipse Modeling Framework). The templates that generate the classes are located in the /resources/flexbuilder/templates folder. These include:

  • Controller.asjet

  • Event.asjet

  • Command.asjet

The Cairngorm Plug-in locates the templates through the project's association to a Cairngorm location. It reads the config file (resources/flexbuilder/cairngorm.xml) to get the template to use.

If you want to change the style of the generated code you can modify the existing templates, or better yet create new ones and update cairngorm.xml. The format used by JET is very similar to the JSP (Java Server Pages) syntax.

The specifics of editing these templates are beyond the scope of this book. Should you be interested in learning more about how to edit Java Emitter Templates, you can check out these tutorials:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required