[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] [Templates] Couldn't find operation 'eContainer()'

Hi, I'm modifying some gmfgen XPand templates to adjust some rules to generate my diagram using these templates, and I want to access to the container of the EObject, so I think I should use the eContainer() operation that an EObject has. But when regenerating the code, an error told me that this operation doesn't exist. I import the ecore metamodel. The code is the following (In the impl::diagram::editParts::NodeEditPart.xpt):

«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»;
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»;

«AROUND createNodeShape(gmfgen::GenNode node) FOR gmfgen::InnerClassViewmap-»
«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createNodeShape() {
«EXPAND newFigureForStereotypes FOR this.eContainer()»
return primaryShape = figure;
}
«ENDAROUND»


«DEFINE newFigureForStereotypes FOR gmfgen::GenNode-»
	...
	«className» figure = new «className»Aux();
	...
«ENDDEFINE»



Exception (Couldn't find operation 'eContainer()' for InnerClassViewmap.:in aspects::impl::diagram::editparts::NodeEditPart on line 213 'this.eContainer()') while generating code
Couldn't find operation 'eContainer()' for InnerClassViewmap.:in aspects::impl::diagram::editparts::NodeEditPart on line 213 'this.eContainer()'




Anybody can help me please???
Thanks!!!