Calling Java from Xpand [message #504332] |
Fri, 18 December 2009 06:33  |
Eclipse User |
|
|
|
Hello!
I want to call a Java method placed in org.eclipse.gmf.codegen from Xpand templates. This Class is accessible because there exist an extension in the codegen plugin that allows it. I want to access to EMFUtils.
I found this entry in the news and Alex Shatalin replies with this, but I cannot get access to this Class. An error appears in the generation.
My Xpand template looks like that:
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
«EXTENSION gmf::EMFUtils»
«AROUND getDiagramVisualID FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
public static void myFunction() {
«getReferencingObjects(self)»
}
«ENDAROUND»
And I get the following exception:
Exception (Cannot find operation (getReferencingObjects(GenContainerBase)) for the type (null):in aspects::xpt::diagram::updater::DiagramUpdater, line 26) while generating code
Cannot find operation (getReferencingObjects(GenContainerBase)) for the type (null):in aspects::xpt::diagram::updater::DiagramUpdater, line 26
What I'm doing wrong?
Thanks.
Marc
PD: Before I ask in M2T forum (link), but I think I should done here.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04618 seconds