Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Compilation with XMLTypePackage.eINSTANCE.getName() - Converter Utils don't expect a String O
[EEF] Compilation with XMLTypePackage.eINSTANCE.getName() - Converter Utils don't expect a String O [message #623066] Thu, 22 July 2010 13:27
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi there,

I am trying EEF on my model, I can generate the EEF genmodel.
I made a new plugin project, and added the dependencies.

I get interresting compilation error on a model Type which has the name
"Name".

As an example. (There are many!)
On the following code in i.e. xxxPropertiesEdititionComponent.java


if (NetworksPackage.eINSTANCE.getCountry_Name().equals(msg.getF eature())
&& basePart != null){
if (msg.getNewValue() != null) {

basePart.setName(EcoreUtil.convertToString(XMLTypePackage.eI NSTANCE.getName(),
msg.getNewValue()));
} else {
basePart.setName("");
}
}

Compilation Error:

"The method ECoreUtil.converToString in the type ECoreUtil is not
applicable for the arguments (String, String)."


I Suspect, the code generation should handle features with a name "Name"
differently. The XMLTypePackage actually defines the feature with an
additional underscore "_", so getName_()


/**
* Returns the meta object for data type '{@link java.lang.String
<em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for data type '<em>Name</em>'.
* @see java.lang.String
* @model instanceClass="java.lang.String"
* extendedMetaData="name='Name' baseType='token'
pattern='\\i\\c*'"
* @generated
*/
EDataType getName_();


Cheers Christophe
Previous Topic:[WME] How to enable logging in WME?
Next Topic:[EEF] Compilation with XMLTypePackage.eINSTANCE.getName() - Converter Utils don't expect a String O
Goto Forum:
  


Current Time: Fri Apr 26 14:25:30 GMT 2024

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

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

Back to the top