Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EEF generated classes do not compile
EEF generated classes do not compile [message #621618] Thu, 26 November 2009 14:48 Go to next message
Eclipse UserFriend
Originally posted by: sgandon.nds.com

Hello there,

I have installed the latest nightly build of EEF to try it out.
Some of the generated EditionComponent classes do not compile
here is the faulty generated code :

///////////////////////////////////// start of code
/**
* Initialize the semantic model listener for live editing mode
*
* @return the semantic model listener
*/
private AdapterImpl initializeSemanticAdapter() {
return new EContentAdapter() {

/**
* {@inheritDoc}
*
* @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged (org.eclipse.emf.common.notify.Notification)
*/
public void notifyChanged(Notification msg) {
if (basePart == null)
BackgroundColorPropertiesEditionComponent.this.dispose();
else {
if (PropertiesPackage.eINSTANCE.getBackgroundColor_Value().equa ls(msg.getFeature()) && basePart != null){
if (msg.getNewValue() != null)//////////////////////////// comment from SeB : here is the faulty code !!!
//FIXME invalid case in liveUpdater(), Case : model = Attribute(1) : value - view = Text
else
basePart.setValue("");
}


}
}

};
}
///////////////////////////////////// end of code

Can you tell me what is going wrong ?

Than you.

SeB.

PS : here is the my ecore metamodel.

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="css"
nsURI="http://www.nds.com/skinning/Css" nsPrefix="css">
<eClassifiers xsi:type="ecore:EClass" name="Model">
<eStructuralFeatures xsi:type="ecore:EReference" name="cssBlocks" upperBound="-1"
eType="#//CssBlocks" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="comments" upperBound="-1"
eType="#//Comments" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CssBlocks">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="selector" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
eType="#//properties/Property" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Comments">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="beforeComments" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="testSampleUrlList" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="afterComments" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eSubpackages name="properties" nsURI="http://www.nds.com/skinning/Css/properties"
nsPrefix="properties">
<eClassifiers xsi:type="ecore:EClass" name="Property" abstract="true"/>
<eClassifiers xsi:type="ecore:EClass" name="Color" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1"
eType="#//datatypes/RgbColor"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="BackgroundColor" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1"
eType="#//datatypes/RgbColor"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AnyOther" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FontFamily" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="fontList" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="BackgroundImage" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1"
eType="#//datatypes/Uri"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Visibility" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1"
eType="#//datatypes/VISIBILITY"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FontSize" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="size" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="BackgroundRepeat" eSuperTypes="#//properties/Property">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1"
eType="#//datatypes/BACKGROUND_REPEAT"/>
</eClassifiers>
</eSubpackages>
<eSubpackages name="datatypes" nsURI="http://www.nds.com/skinning/Css/datatypes"
nsPrefix="datatypes">
<eClassifiers xsi:type="ecore:EDataType" name="RgbColor" instanceClassName="org.eclipse.swt.graphics.RGB"/>
<eClassifiers xsi:type="ecore:EDataType" name="Uri" instanceClassName="java.net.URI"/>
<eClassifiers xsi:type="ecore:EEnum" name="VISIBILITY">
<eLiterals name="VISIBLE" literal="visible"/>
<eLiterals name="HIDDEN" value="1" literal="hidden"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="BACKGROUND_REPEAT">
<eLiterals name="REPEAT" literal="repeat"/>
<eLiterals name="REPEAT_X" value="1" literal="repeat-x"/>
<eLiterals name="REPEAT_Y" value="2" literal="repeat-y"/>
<eLiterals name="NO_REPEAT" value="3" literal="no-repeat"/>
</eClassifiers>
</eSubpackages>
</ecore:EPackage>
Re: EEF generated classes do not compile [message #621621 is a reply to message #621618] Fri, 27 November 2009 08:54 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070204010602040007090400
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Seb,

It looks like your EEF component models contains some mapping that are
not yet supported by the generation.

typically, you are trying to map the colorbackground feature with a text
widget. What is the EType used by this feature ?

Cheers,


seb.fr a écrit :
> Hello there,
>
> I have installed the latest nightly build of EEF to try it out.
> Some of the generated EditionComponent classes do not compile
> here is the faulty generated code :
>
> ///////////////////////////////////// start of code
> /**
> * Initialize the semantic model listener for live editing mode
> * * @return the semantic model listener
> */
> private AdapterImpl initializeSemanticAdapter() {
> return new EContentAdapter() {
>
> /**
> * {@inheritDoc}
> * * @see
> org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged
> (org.eclipse.emf.common.notify.Notification)
> */
> public void notifyChanged(Notification msg) {
> if (basePart == null)
>
> BackgroundColorPropertiesEditionComponent.this.dispose();
> else {
> if
> (PropertiesPackage.eINSTANCE.getBackgroundColor_Value().equa
> ls(msg.getFeature()) && basePart != null){
> if (msg.getNewValue() !=
> null)//////////////////////////// comment from SeB : here is the faulty
> code !!!
> //FIXME invalid case in liveUpdater(), Case : model = Attribute(1) :
> value - view = Text
> else
> basePart.setValue("");
> }
>
>
> }
> }
>
> };
> }
> ///////////////////////////////////// end of code
>
> Can you tell me what is going wrong ?
>
> Than you.
>
> SeB.
>
> PS : here is the my ecore metamodel.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="css"
> nsURI="http://www.nds.com/skinning/Css" nsPrefix="css">
> <eClassifiers xsi:type="ecore:EClass" name="Model">
> <eStructuralFeatures xsi:type="ecore:EReference" name="cssBlocks"
> upperBound="-1"
> eType="#//CssBlocks" containment="true"/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="comments"
> upperBound="-1"
> eType="#//Comments" containment="true"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="CssBlocks">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="selector"
> lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="properties"
> upperBound="-1"
> eType="#//properties/Property" containment="true"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Comments">
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="beforeComments" upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="testSampleUrlList" upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="afterComments"
> upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eClassifiers>
> <eSubpackages name="properties"
> nsURI="http://www.nds.com/skinning/Css/properties"
> nsPrefix="properties">
> <eClassifiers xsi:type="ecore:EClass" name="Property" abstract="true"/>
> <eClassifiers xsi:type="ecore:EClass" name="Color"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> lowerBound="1"
> eType="#//datatypes/RgbColor"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="BackgroundColor"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> lowerBound="1"
> eType="#//datatypes/RgbColor"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="AnyOther"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="FontFamily"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="fontList"
> upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="BackgroundImage"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> lowerBound="1"
> eType="#//datatypes/Uri"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Visibility"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> lowerBound="1"
> eType="#//datatypes/VISIBILITY"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="FontSize"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="size"
> lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="BackgroundRepeat"
> eSuperTypes="#//properties/Property">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> lowerBound="1"
> eType="#//datatypes/BACKGROUND_REPEAT"/>
> </eClassifiers>
> </eSubpackages>
> <eSubpackages name="datatypes"
> nsURI="http://www.nds.com/skinning/Css/datatypes"
> nsPrefix="datatypes">
> <eClassifiers xsi:type="ecore:EDataType" name="RgbColor"
> instanceClassName="org.eclipse.swt.graphics.RGB"/>
> <eClassifiers xsi:type="ecore:EDataType" name="Uri"
> instanceClassName="java.net.URI"/>
> <eClassifiers xsi:type="ecore:EEnum" name="VISIBILITY">
> <eLiterals name="VISIBLE" literal="visible"/>
> <eLiterals name="HIDDEN" value="1" literal="hidden"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EEnum" name="BACKGROUND_REPEAT">
> <eLiterals name="REPEAT" literal="repeat"/>
> <eLiterals name="REPEAT_X" value="1" literal="repeat-x"/>
> <eLiterals name="REPEAT_Y" value="2" literal="repeat-y"/>
> <eLiterals name="NO_REPEAT" value="3" literal="no-repeat"/>
> </eClassifiers>
> </eSubpackages>
> </ecore:EPackage>
>


--------------070204010602040007090400
Content-Type: text/x-vcard; charset=utf-8;
name="stephane_bouchet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="stephane_bouchet.vcf"

YmVnaW46dmNhcmQNCmZuO3F1b3RlZC1wcmludGFibGU6U3Q9QzM9QTlwaGFu ZSBCb3VjaGV0
DQpuO3F1b3RlZC1wcmludGFibGU6Qm91Y2hldDtTdD1DMz1BOXBoYW5lDQpv cmc6T2Jlbw0K
YWRyO3F1b3RlZC1wcmludGFibGU6Ozs7UmV6PUMzPUE5Ozs0NDQwMDtGcmFu Y2UNCmVtYWls
O2ludGVybmV0OnN0ZXBoYW5lLmJvdWNoZXRAb2Jlby5mcg0KeC1tb3ppbGxh LWh0bWw6RkFM
U0UNCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------070204010602040007090400--
Previous Topic:[EMF Compare] Problem with three way merge
Next Topic:[EMF Compare] Multiple matches
Goto Forum:
  


Current Time: Sat Jun 12 21:49:08 GMT 2021

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

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

Back to the top