|
Re: [ATL] Can I define a contextual attribute in Library ATL file? [message #71630 is a reply to message #71591] |
Thu, 10 January 2008 09:48  |
Eclipse User |
|
|
|
Originally posted by: mikael.barbero.gmail.com
Hi,
Yes you can. Do not forget that your metamodel name of the context must
correspond to a source metamodel of the transformation that will use
your library, e.g.:
the library lib.atl:
--@atlcompiler atl2006
library myLib;
helper context MM!A def: myHelper : String =
....;
the module:
--@atlcompiler atl2006
module myModule;
create OUT:MM2 from IN:MM;
uses myLib;
.....
If you want to use attribute helper (helper without parameter that will
be cached during the execution of the transformation) as I did in the
above example, do not forget to specify the compilation directive to use
the atl2006 compiler. You can do it by specifying the line:
--@atlcompiler atl2006
on the first line of you library. It is also strongly encouraged to use
it in your module (as the first line also).
Regards,
Mikael
Michael wrote:
> Hi,
> Can I define a contextual attribute in Library ATL file?
> Thanks.
> Best regard.
> Michael
>
>
>
--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
|
|
|
Powered by
FUDForum. Page generated in 0.06788 seconds