Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Float and Double
Float and Double [message #105987] Wed, 03 June 2009 15:26 Go to next message
ln is currently offline lnFriend
Messages: 1
Registered: July 2009
Junior Member
Hello,

I am trying to transform a model conform to an UML Profile to another
model conform to an ecore file (The ecore file comes from another
application and it can't be changed).

Some elements in the output model have attributes defined as float:
<eStructuralFeatures xsi:type="ecore:EAttribute" name="max"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//Float"
unsettable="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="min"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//Float"
unsettable="true">

But when I set the attributes
val: distinct tool!Value foreach (a in calibList)(
name <- a.name,
max <- 10.2,
min <- 2.1
)

It fails with the following message:
java.lang.ClassCastException: The value of type 'class
java.lang.Double' must be of type 'class java.lang.Float'

I tried to change the type to EFloat but I got the same error:
<eStructuralFeatures xsi:type="ecore:EAttribute" name="default"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"
unsettable="true">

Thanks in advance

Helene
Re: [ATL] Float and Double [message #106209 is a reply to message #105987] Mon, 08 June 2009 12:56 Go to previous message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080700050105040005040806
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Helene,

What is your ATL version? With the last one, this should work.

Regards,
Freddy.

ln a
Previous Topic:problem launching atl from java
Next Topic:[ATL] Issue with matching non related targets.
Goto Forum:
  


Current Time: Fri Apr 19 01:55:34 GMT 2024

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

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

Back to the top