Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Can I define a contextual attribute in Library ATL file?
[ATL] Can I define a contextual attribute in Library ATL file? [message #71591] Thu, 10 January 2008 14:40 Go to next message
Mikai Yang is currently offline Mikai YangFriend
Messages: 149
Registered: July 2009
Senior Member
Hi,
Can I define a contextual attribute in Library ATL file?
Thanks.
Best regard.
Michael
Re: [ATL] Can I define a contextual attribute in Library ATL file? [message #71630 is a reply to message #71591] Thu, 10 January 2008 14:48 Go to previous message
Eclipse UserFriend
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/
Previous Topic:[ATL] How to compile a library ATL file?
Next Topic:[ATL] [?bug?] getAppliedStereotype sometimes doesnt work
Goto Forum:
  


Current Time: Sun Apr 11 00:56:42 GMT 2021

Powered by FUDForum. Page generated in 0.01918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top