Monday, October 26, 2009

Acceleo template editor latest improvements

We try and constantly improve the Acceleo template editor as much as we can so as to make it as intuitive as possible. I haven't posted anything here about the template editing, here is a brief recapitulation of the features we're supporting (apart from the basic functions inherited from the text editor such as search, incremental search, ...). Including the latests and in no particular order :

  • Syntax highlighting
A classic for any self-respecting code editor, Acceleo provides highlighting for all module elements, though highlighting is minimal for OCL elements.
  • Error detection
Once again, a classic for any editor which contents are compiled, interpreted, or in any way error-prone.
  • Quick fix (ctrl+shift+1)
Not much accessible in terms of quick fixes yet, Acceleo only provides the possibility to create templates or queries corresponding to "not found" compilation errors.
  • Completion (ctrl+space)
We provide code completion for templates, queries, operations and OCL standard elements.
  • Open declaration (ctrl+click ; F3)
Sorry, no fancy screenshot on this one, as I don't know how to make a meaningful one :p. Anyone familiar with Eclispe's Java editor knows this one; it basically allows you to find the declaration of any variable, type, operation, ... by a single click on its usage within the code. This allows navigation to and from other Acceleo templates, and to the metamodel when calling it on a metatype.
  • Quick outline (ctrl+o)
This allows users to quickly assess the size of a given module, find a query or template defined in it and navigate to it through a few clicks. Note that this doesn't show as much information as the regular outline view, since it is only designed to outline the module's architecture.
  • Search references (ctrl+shift+g)
Still needs some polishing to only find references in the accurate scope, yet this already allows users to find references to the selected variable or template.
  • Code folding
Granted, a screenshot is somewhat cryptic for this feature if you do not already know what code folding is. Basically, blocks of code (in Acceleo, comments, templates and queries) can be folded so that they only take two lines. If you look carefully at the screenshot below, you'll notice the "+" on the left edge right to the line numbers "4" and "8" ... as well as the fact we're missing lines 5 and 9; well, those two templates are folded :p.

More features will be included in the editor as there's a bunch of cool features that can be added to simplify template editing; next are the refactoring facilities \o/.

No comments:

Post a Comment