| 
| [ATL] EFloat attribute assignment [message #85024] | Tue, 24 June 2008 06:41 |  | 
| Eclipse User  |  |  |  |  | Hi all, I am developing a very simple ATL transformation from Eclipse UML2 to
 one of my DSL metamodels.
 
 This is a simplified version of my rule:
 
 rule SAcomponent_Clock{
 from
 s : UML2!Component
 to
 t : saveccm!Clock (
 jitter <- 4.5,
 )
 }
 
 The problem resides in the binding because the type of the jitter
 attribute is EFloat and ATL works only with Double precision float
 numbers, so I get the following Exception:
 
 GRAVE: ****** BEGIN Stack Trace
 GRAVE: 	message: cannot set feature saveccm!Clock.jitter to value 5.5
 GRAVE: 	exception:
 GRAVE: The value of type 'class java.lang.Double' must be of type 'class
 java.lang.Float'
 java.lang.ClassCastException: The value of type 'class java.lang.Double'
 must be of type 'class java.lang.Float'
 
 Does anyone know how to set an EFloat attribute to ATL?
 
 It's overstated that I cannot modify the target metamodel changing the
 type of the jitter attribute to  EDouble!
 
 Regards,
 Ivano
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.07615 seconds