[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: [Templates] Couldn't find operation 'eContainer()'
|
- From: mgil@xxxxxxxxxxxxx (Marc )
- Date: Tue, 17 Feb 2009 14:06:54 +0000 (UTC)
- Newsgroups: eclipse.modeling.gmf
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
It seems to be a good idea. But now, the only way to get the eContainer is
using Xtend, a method that returns me the eContainer, it's true? Something
like that:
*****************
import "http://www.eclipse.org/emf/2002/Ecore";
EObject getEContainer(EObject eobj) :
eobj.eContainer()
;
*****************
In the XPand rule I should call this method:
*****************
«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createNodeShape() {
«EXPAND newFigureForStereotypes FOR getEContainer(this)»
return primaryShape = figure;
}
«ENDAROUND»
«DEFINE newFigureForStereotypes FOR gmfgen::GenNode-»
...
«ENDDEFINE»
*****************
Thanks!!!
Marc