|Re: EEF generated classes do not compile [message #621860 is a reply to message #500630]
||Mon, 30 November 2009 09:20
Originally posted by: sgandon.nds.com|
if this is a matter of data type conversion I would suggest EEF uses the default EMF conversion behaviour.
EMF creates data conversion methods when the genmodel is used for generation.
There are 2 methods
found in the factory implementation class that serves this purpose in EMF genererated code (look at Data Type section in http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.html).
So I would suggest that EEF use the
org.eclipse.emf.ecore.util.EcoreUtil.createFromString(EDataT ype eDataType,java.lang.String literal)
org.eclipse.emf.ecore.util.EcoreUtil.convertToString(EDataTy pe eDataType, java.lang.Object value)
for converting the Data to and from text.
This would allow for default EEF generation without any error.
[quote title=Stephane Bouchet wrote on Fri, 27 November 2009 04:04]This is a multi-part message in MIME format.
Content-Type: text/plain; charset=UTF-8; format=flowed
Sorry i just looked to your metamodel and here is the problem :
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
you are trying to map a custom edatatype ( rgbcolor ) with a text. this
is not supported now by EEF.
you can avoid this generated part by replacing your element editor
"background_value" with a "custom element editor". EEF will generates
empty code that needs to be filled by you to handle th mapping manually.
Powered by FUDForum
. Page generated in 0.02240 seconds