Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Problems accessing to QVTO operations
icon9.gif  Problems accessing to QVTO operations [message #504316] Fri, 18 December 2009 05:04 Go to next message
Marc Gil is currently offline Marc Gil
Messages: 189
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hello again!

First of all, I don't know if put this topic here or in thg GMF forum, because it affects to the GMF transformation using XPand templates and QVTO extensions...

I'm having problems when access to the operations of a QVTO extension. My XPand file 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»


The getReferencingObjects(EObject) is a function placed in a Class in the *gmf.codegen plugin, and is acessible because in the gmf plugin extensions is declared the following extension:
<extension point="org.eclipse.m2m.qvt.oml.javaBlackboxUnits">
    <unit name="EMFUtils" namespace="gmf">
       <library class="org.eclipse.gmf.internal.codegen.util.EMFUtils">
             <metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore"/>
       </library>
    </unit>
</extension>


So I think all is well configured to access to this funtion in this class. I had seen examples in UML2 project, that access to gmf::GenModelUtils extension with the same way I'm doing, and it doesn't work for me... I'm desperate Sad

The error I get is:
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

Anybody know where I'm wrong???

Thanks in advance!
Marc

[Updated on: Fri, 18 December 2009 05:07]

Report message to a moderator

Re: Problems accessing to QVTO operations [message #504351 is a reply to message #504316] Fri, 18 December 2009 08:11 Go to previous message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1761
Registered: July 2009
Senior Member
Hi Marc,

since you're referring to GMF's modified version of Xpand.
It's best to ask at the GMF newsgroup (which I've CCed).

Cheers,
Sven

Marc schrieb:
> Hello again!
>
> First of all, I don't know if put this topic here or in thg GMF forum,
> because it affects to the GMF transformation using XPand templates and
> QVTO extensions...
>
> I'm having problems when access to the operations of a QVTO extension.
> My XPand file 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»
>
>
> The getReferencingObjects(EObject) is a function placed in a Class in
> the *gmf.codegen plugin, and is acessible because in the gmf plugin
> extensions is declared the following extension:
>
> <extension point="org.eclipse.m2m.qvt.oml.javaBlackboxUnits">
> <unit name="EMFUtils" namespace="gmf">
> <library class="org.eclipse.gmf.internal.codegen.util.EMFUtils">
> <metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore"/>
> </library>
> </unit>
> </extension>
>
>
> So I think all is well configured to access to this funtion in this
> class. I had seen examples in UML2 project, that access to
> gmf::GenModelUtils extension with the same way I'm doing, and it doesn't
> work for me... I'm desperate :(
>
> Anybody know where I'm wrong???
>
> Thanks in advance!
> Marc


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:QVTO helper fails
Next Topic:[XPAND] [MWE] 0.8.0 regression
Goto Forum:
  


Current Time: Sat Aug 23 15:31:49 EDT 2014

Powered by FUDForum. Page generated in 0.03847 seconds