| [ATL] parameterizing metamodel elements [message #84806] | 
Thu, 19 June 2008 11:02   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
        I was wondering if something like this is possible in ATL and how. 
 
rule class2class 
{                        
 from i : UML!Class 
 to o : UML!Class mapsTo i 
 ( 
  name <- i.name 
 ) 
 do 
 { 
  o.<metamodel parameter> <- 'somevalue'; 
 } 
} 
 
where <metamodel parameter> could be for instance name, isAbstract, isLeaf 
etc.  
 
 
thanks in advance. 
regards, 
                Aram. 
 
 
--  
Aram Hovsepyan 
Distrinet research group 
Katholieke Universiteit Leuven
 |  
 |  
  | 
| Re: [ATL] parameterizing metamodel elements [message #84884 is a reply to message #84806] | 
Mon, 23 June 2008 03:50   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hello, 
 
There is no kind of parametrizable templates in ATL, but a possible  
solution could be to generate ATL transformations, using the ATL metamodel. 
create OUT:ATL from IN:metamodel 
 
Here is an example of transformation creating ATL :  
 http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier 
 
Note that the mapsTo word is reserved by the syntax but isn't actually  
used in ATL. 
 
Best regards, 
 
William 
 
Aram Hovsepyan a écrit : 
>                 Hi, 
>  
>         I was wondering if something like this is possible in ATL and how. 
>  
> rule class2class 
> {                        
>  from i : UML!Class 
>  to o : UML!Class mapsTo i 
>  ( 
>   name <- i.name 
>  ) 
>  do 
>  { 
>   o.<metamodel parameter> <- 'somevalue'; 
>  } 
> } 
>  
> where <metamodel parameter> could be for instance name, isAbstract, isLeaf 
> etc.  
>  
>  
> thanks in advance. 
> regards, 
>                 Aram. 
>  
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.55568 seconds