Community
Participate
Working Groups
Created attachment 203511 [details] Testcase. Import the attached handler. When it generates, you get the following exception: org.eclipse.edt.mof.codegen.api.TemplateException: java.lang.ClassCastException: org.eclipse.edt.mof.egl.impl.ArrayAccessImpl cannot be cast to org.eclipse.edt.mof.egl.Name at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:384) at org.eclipse.edt.mof.codegen.api.TemplateContext.invoke(TemplateContext.java:260) at org.eclipse.edt.gen.javascript.templates.AssignmentStatementTemplate.genStatementBody(AssignmentStatementTemplate.java:21) at sun.reflect.GeneratedMethodAccessor94.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:357) at org.eclipse.edt.mof.codegen.api.TemplateContext.invoke(TemplateContext.java:260) at org.eclipse.edt.gen.javascript.templates.StatementTemplate.genStatement(StatementTemplate.java:25) at org.eclipse.edt.gen.javascriptdev.templates.StatementTemplate.genStatement(StatementTemplate.java:26) at sun.reflect.GeneratedMethodAccessor85.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:357) at org.eclipse.edt.mof.codegen.api.TemplateContext.invoke(TemplateContext.java:260) Caused by: java.lang.ClassCastException: org.eclipse.edt.mof.egl.impl.ArrayAccessImpl cannot be cast to org.eclipse.edt.mof.egl.Name at org.eclipse.edt.gen.javascript.templates.AssignmentTemplate.genExpression(AssignmentTemplate.java:35) at sun.reflect.GeneratedMethodAccessor95.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:357) ... 131 more
This blocks the RUI Technical Sample.
There is no longer a generation error with this particular test case, but I am still having an issue with the sample application where this defect was found. I realize that the defect has not been marked as resolved yet, so this new issue may already be known. If it is not known, let me know if you want another defect. The details are: I tried the Tic Tac Toe demo in the org.eclipse.edt.rui.samples_0.7.0 project, and there appears to be an issue if you drop more than one symbol on the grid. I added some trace statements to the Board::getImageID(n int) function, and I am getting the following results for the first time a symbol is dropped: Box 1 has no children Box 2 has no children Box 3 has no children Box 4 has no children Box 5 has no children Box 6 has children Box 7 has no children Box 8 has no children Box 9 has no children Box 1 has no children Box 4 has no children Box 7 has no children Box 2 has no children Box 5 has no children Box 8 has no children Box 3 has no children Box 6 has children Box 9 has no children Box 1 has no children Box 5 has no children Box 9 has no children Box 3 has no children Box 5 has no children Box 7 has no children and I am getting the following results the second time a symbol is dropped: Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children Box [type=eglx.lang.AnyBoxedObject] has no children
Brian, The original problem was common to both generators so I worked with Jeff to identify the root cause and he fixed it in both Java and JavaScript. However, as you've noted, the problem is still unresolved; I think it has to do with both generators lacking logic for handling type conversions involving arrays. I'm somewhat familiar with RBD's logic, but the "original intent" wasn't very clear so exactly how that translates to EDT is still to be determined. So obviously Jeff and I have more work to do on this defect....
Now the Tic Tac Toe works fine, resolve this bug. Thanks.
20111130 build.
Closing.