|[ATL] Content assist [message #67918]
||Fri, 30 November 2007 17:26
| William Piers
Registered: July 2009
This is a multi-part message in MIME format.|
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I just committed a new feature for the ATL editor : a basic content
assist system. This feature will be released in the next build of ATL,
which will normally be released on 14th december.
Content assist is desactivated by default, you can use it by checking
the "Enable auto-activation" checkbox in the ATL -> content assist
preference page. Note that you must close/reopen all .atl files to apply
any changes in the preferences.
Completion purposes basic templates for rule, helper, from, to, do,
You can also access metamodel informations by writing, at the top of the
file, two type of informations about metamodels :
- the nsURI for a given metamodel
- the path of a given metamodel
For instance, here is the top of an UML2Relational transformation :
-- @path Relational=/UML2Relational/metamodels/relational.ecore
-- @nsURI UML=http://www.eclipse.org/uml2/2.1.0/UML
create OUT : Relational from IN : UML;
<...transformation helpers and rules>
Putting that information allows you to have content assist on :
- helpers :
* primitive types
* model elements
- rules :
* input, output model elements
* left-part of bindings
As I said, this feature is not in the builded version at this time, but
you can test it if you're working with the CVS version, and any bugs or
comments are welcome.
Note that a non-regression test has also just been released on CVS, in
order to improve the new emfvm and make it conform to the standard VM. A
page on the Atl site will soon explain that in details.
Content-Type: text/x-vcard; charset=utf-8;
adr:2 rue Robert Schumann;;lot 24;NANTES;;44408;France
tel;work:+33 (0)2 51 13 51 82
tel;cell:+33 (0)6 20 31 75 98
|Re: [ATL] Content assist [message #69848 is a reply to message #67918]
||Mon, 17 December 2007 22:50
| Matthias Bohlen
Registered: July 2009
On 2007-11-30 18:26:52 +0100, William Piers <email@example.com> said:|
> I just committed a new feature for the ATL editor : a basic content
> assist system. This feature will be released in the next build of ATL,
> which will normally be released on 14th december.
thank you for this feature - it works well for a first version. I
expected to get content assist after typing a dot ('.'), too, but that
is of course much harder to implement.
Today, I added two things to the code base:
* I installed an action so that ATL provides content assist when the
user types Ctrl-Space.
* I changed one line in the processing of relative metamodel path names:
- EPackage regValue = (EPackage) load(URI.createFileURI(path), resourceSet);
+ EPackage regValue = (EPackage)
load(URI.createPlatformResourceURI(path, true), resourceSet);
As you can see, I replaced the file based URI with a platform based URI
so that the syntax
"-- @path metamodelId=/projectName/metamodelDirectory/someMetamodel.ec ore "
P.S.: By the way, where is the regression test code that you mentioned
in your post? I'd like to run it.
Powered by FUDForum
. Page generated in 0.01956 seconds