ATL Editor content assist
From Eclipsepedia
Contents |
Description
The current version of ATL (newer than 2.0.0RC2) provides a basic content assist system.
Completion purposes basic templates for rule, helper, from, to, do, using sections. You can also access EMF metamodels informations (from their nsURI, or a relative path).
Completion on helpers
- primitive types
- some model elements : context, parameter types, output type
Completion on rules
- input, output model elements
- left-part of bindings
Use
To make model elements completion available, you have to put some information on the top of the file :
- -- @nsURI : the nsURI for a given metamodel, if you want to load a metamodel from the EMF registry,
- -- @path : the path of a given metamodel, if you want to dynamically load a metamodel from an ecore file.
Only EMF metamodels are supported. You must spécify the relative path of the file into the workspace.
Here is the top of an UML2AnyMM transformation :
-- @path AnyMM=/AnyProject/AnyFolder/AnyMM.ecore -- @nsURI UML=http://www.eclipse.org/uml2/2.1.0/UML module Class2Relational; create OUT : AnyMM from IN : UML; -- ...transformation helpers and rules
Completion is triggered with the Ctrl + space keys, or when typing a space in a context where some content assist is available.

