EEF generated classes do not compile [message #621618] |
Thu, 26 November 2009 14:48 |
Eclipse User |
|
|
|
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>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02837 seconds