Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » FeatureEList cannot be cast to BasicEList
FeatureEList cannot be cast to BasicEList [message #625376] Wed, 22 September 2010 04:31
Damien Fournier is currently offline Damien Fournier
Messages: 12
Registered: July 2009
Location: Lille, France
Junior Member
Hello,

I've started a Xtext editor based on the SCA model provided by the Eclipse SCA Tools Project. I've set up a new project which imports ecore files from org.eclipse.stp.sca, and I've begun a grammar with the following rules:

Composite returns sca::Composite:
	'composite' name=ID
	'{'
	(component+=Component)*
	(service+=Service)*
	(reference+=Reference)*
	(property+=Property)*
	'}';
	
Component returns sca::Component:
   'component' name=ID '{'
    '}'
    ;
    
Service returns sca::Service:
	 'service' name=ID;
	
Reference returns sca::Reference:
	'reference' name=ID ;
	
Property returns sca::Property:
	'property' name=ID '=' (value=STRING)? ;


In the generated editor, assignments with 'reference', 'service', 'property' and 'component' of the Composite rule results with this error:
org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureEList cannot be cast to org.eclipse.emf.common.util.BasicEList

for example when typing

composite composite1 {
  service s1
  property p1
}

'service p1' and 'property p1' will be marked as error.

Does anyone knows why I encounter such error ? Is there something wrong in my grammar ?
Previous Topic:Understanding importURI mechanism
Next Topic:Validation: generating error messages
Goto Forum:
  


Current Time: Sat May 18 19:33:14 EDT 2013

Powered by FUDForum. Page generated in 0.02514 seconds