Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "ATL Editor content assist"

(New page: ==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 section...)
 
Line 1: Line 1:
==Description==
+
=Description=
  
 
The current version of ATL (newer than 2.0.0RC2) provides a basic content assist system.
 
The current version of ATL (newer than 2.0.0RC2) provides a basic content assist system.
Line 6: Line 6:
 
You can also access EMF metamodels informations (from their nsURI, or a relative path).
 
You can also access EMF metamodels informations (from their nsURI, or a relative path).
  
===Completion on helpers===
+
==Completion on helpers==
 
* primitive types
 
* primitive types
* some model elements : context, parameter types, output type
+
* some model elements: context, parameter types, output type
===Completion on rules===
+
==Completion on rules==
 
* input, output model elements
 
* input, output model elements
 
* left-part of bindings
 
* left-part of bindings
  
==Use==
+
=Use=
  
 
To make model elements completion available, you have to put some information on the top of the file :
 
To make model elements completion available, you have to put some information on the top of the file :

Revision as of 13:43, 12 January 2009

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.

Back to the top