Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323150 - [HUTN] Support generation of Longs, Shorts, Bytes and Doubles
Summary: [HUTN] Support generation of Longs, Shorts, Bytes and Doubles
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dimitris Kolovos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-19 10:42 EDT by Louis Rose CLA
Modified: 2012-02-06 10:59 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.