Hi!
I have the following qvto file:
modeltype genmodel uses "http://www.eclipse.org/emf/2002/GenModel";
modeltype ecore uses "http://www.eclipse.org/emf/2002/Ecore";
library mutatingUtils;
helper getModelSwitchQualifiedName(gc : genmodel::GenClass) : String {
return gc.genPackage.basePackage + '.' + gc.genPackage.ecorePackage.name + '.' + gc.genPackage.utilityPackageSuffix + '.' + gc.genPackage.prefix + 'Switch'
}
And I access to this helper in my xpt file like this:
«DEFINE createMutatingSwitch FOR gmfgen::GenDiagram»
static class EReferenceDiagramSwitch {
public org.eclipse.emf.ecore.EReference doSwitch(org.eclipse.emf.ecore.EObject modelElement) {
...
«getModelSwitchQualifiedName(domainDiagramElement)» aSwitch = new «getModelSwitchQualifiedName(domainDiagramElement)»() {
...
}
}
«ENDDEFINE»
But when execute the transformation, an error occurs:
Exception (Can't evaluate expression: retured value is OclInvalid:in aspects::xpt::diagram::editpolicies::DiagramItemSemanticEditPolicy, line 85) while generating code
Can't evaluate expression: retured value is OclInvalid:in aspects::xpt::diagram::editpolicies::DiagramItemSemanticEditPolicy, line 85
Could anybody help me please? I don't know what I'm doing wrong... I'm doing the same like the GMF templates, but I don't know if I must to specify certain plugins or extensions in the plugin dependency list...
Thanks!!
Marc