Community
Participate
Working Groups
From forum, original is located at http://www.eclipse.org/forums/index.php/t/277444/ <quote> I have a node mapping in my gmpmap model without a domain element. When I try to generate the diagram code, I get this error: Exception (No Definition getLabelFeatureText(OclInvalid_Class) for GenChildNode could be found!) while generating code org.eclipse.gmf.internal.xpand.model.EvaluationException: No Definition getLabelFeatureText(OclInvalid_Class) for GenChildNode could be found! at org.eclipse.gmf.internal.xpand.XpandFacade.evaluate(XpandFacade.java:57) at org.eclipse.gmf.internal.xpand.ast.ExpandStatement.evaluateInternal(ExpandStatement.java:139) at org.eclipse.gmf.internal.xpand.ast.Statement.evaluate(Statement.java:29) at... I think the getText method for GenNodes causes the problem. It checks whether there are any labels and if there are none it uses the model elements metaclass to produce a label, but that is null. Strangely, in the same method for GenLink (also below) there is an explicit check whether the modelFacet is null (then an empty string is returned). IS THIS A BUG IN THE TEMPLATE? «DEFINE getText FOR gmfgen::GenNode-» «IF labels->isEmpty()-» «EXPAND getLabelFeatureText(modelFacet.metaClass)-» «ELSE-» «EXPAND getDiagramLabelText(labels->asSequence())-» «ENDIF-» «ENDDEFINE» «DEFINE getText FOR gmfgen::GenLink-» «IF labels->isEmpty()-» «IF null <> modelFacet-» «EXPAND getText(modelFacet)-» «ELSE-» «EXPAND returnEmptyString-» «ENDIF-» «ELSE-» «EXPAND getDiagramLabelText(labels->asSequence())-» «ENDIF-» «ENDDEFINE» </quote>
pushed to 3.0 & 2.4M streams