Community
Participate
Working Groups
Create a file named AnyTemplateTest.egl Add the following EGL Source: // Handler AnyTemplateTest type RUIWidget {} nodeContainer Widget { children = [ ], paddingLeft = 12, style="text-align: left;", background = "url(images/TreeNodeL.gif) no-repeat" }; outerContainer Widget { children = [ nodeContainer as Widget ], background = "url(images/TreeNodeI.gif) repeat-y" }; function main() end end Save and build the file with the JavaScript generator. The following exception is thrown: generating:test.AnyTemplateTest[test/AnyTemplateTest.egl]:(16) org.eclipse.edt.mof.codegen.api.TemplateException: at org.eclipse.edt.gen.EglContext.getPrimitiveMapping(EglContext.java:232) at org.eclipse.edt.gen.javascript.templates.egl.lang.AnyTypeTemplate.genConversionOperation(AnyTypeTemplate.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:359) I believe the fix is to replace line 32 of AnyTypeTemplate.java with: if (ctx.getPrimitiveMapping(arg.getObjectExpr().getType().getClassifier().getTypeSignature()) == null) {
Brian, Looks like your fix is already committed, and I verified that the provided testcase gens, so I'm marking this one resolved; re-open if necessary....thanks.
Tested with the latest code from CVS and no exception is thrown.