| Summary: | Template Exception thrown when processing the AS statement | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Brian Svihovec <svihovec> |
| Component: | EDT | Assignee: | Project Inbox <edt.javascriptgen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | greer |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
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. |
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) {