Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323150

Summary: [HUTN] Support generation of Longs, Shorts, Bytes and Doubles
Product: [Modeling] Epsilon Reporter: Louis Rose <louis>
Component: CoreAssignee: Dimitris Kolovos <dkolovos>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hal
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Louis Rose CLA 2010-08-19 10:42:34 EDT
Reported by Hallvard Traetteberg (http://www.eclipse.org/forums/index.php?t=msg&th=173580&start=0&S=beaab0157c90446724f4c7f7a3e5513c):

"I've an attribute of the Ecore type EDouble, and the HUTN editor  complains that 1.0 is not an EDouble value. If I change the type to EFloat 1.0 is accepted."

A workaround, for now, is to change the metamodel:

"I can change the type from EDouble to EFloat in the [meta]model, but changing the type in the [meta]model isn't always an option."
Comment 1 Louis Rose CLA 2010-08-19 10:44:40 EDT
I've added a coerceValues method to AttributeSlot, which is called following the AST -> HUTN slot model transformation. The coerceValues method uses the EMF Factory's createFromString method to generate a value appropriate for the feature, as defined in the target metamodel.
Comment 2 Louis Rose CLA 2010-08-19 10:49:43 EDT
I've committed this fix to SVN. Assigning to Dimitris for build integration. Thanks!
Comment 3 Dimitris Kolovos CLA 2010-09-06 09:31:37 EDT
Fixed in the latest interim version.
Comment 4 Dimitris Kolovos CLA 2010-11-25 08:22:27 EST
Fixed in 0.8.0.