Community
Participate
Working Groups
Build Identifier: 2011-09-22 Step to recreate: 1. new a RUI handler 2. new a string variable in the handler 3. in the data view, dnd the string variable onto VE 4. select "Editable Data" in the dnd wizard and finish 5. some code generated, and compile error showed in handleValidStateChange function, compile exceptions also shown as below. I did a investigation, and found that it is caused that the compiler wrong to compile org.eclipse.edt.rui.mvc.FormField to org.eclipse.edt.mof.egl.FormField. You can set a debug point in 61 line (List contents = ((Handler)result.getBoundPart()).getContents();) of org.eclipse.edt.ide.rui.document.utils.TypeNameResolver to see that, after compiler, in the memory, it shows the contents comtents org.eclipse.edt.rui.mvc.FormField instead of org.eclipse.edt.mof.egl.FormField org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.ClassCastException: org.eclipse.edt.mof.impl.EClassImpl incompatible with org.eclipse.edt.mof.egl.Type at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:187) at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:152) at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.processParts(AbstractBuilder.java:99) at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:136) at org.eclipse.edt.ide.core.internal.builder.Builder.cleanBuild(Builder.java:167) at org.eclipse.edt.ide.core.internal.builder.Builder.build(Builder.java:94) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.ClassCastException: org.eclipse.edt.mof.impl.EClassImpl incompatible with org.eclipse.edt.mof.egl.Type at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:130) at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1) at org.eclipse.edt.compiler.core.ast.FunctionDataDeclaration.accept(FunctionDataDeclaration.java:76) at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:429) at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1) at org.eclipse.edt.compiler.core.ast.ForStatement.accept(ForStatement.java:163) at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.handleEndVisitPart(Egl2MofPart.java:521) at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.defaultHandleVisitPart(Egl2MofPart.java:386) at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.visit(Egl2MofPart.java:199) at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1) at org.eclipse.edt.compiler.core.ast.Handler.accept(Handler.java:55) at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.convert(Egl2Mof.java:160) at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.createIRFromBoundAST(AbstractProcessingQueue.java:245) at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.processCompiledPart(AbstractProcessingQueue.java:221) at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:164) at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169) ... 17 more Reproducible: Always
I have added code to prevent the class cast exceptions in the EGL2Mof code. However, the root of the problem is that the VE code is not adding an import statement for the org.eclipse.edt.rui.mvc.FormField. Because of this, the environment is resolving to the FormField that is defined in the mof model. I am rerouting this defect to EDT IDE, since a change needs to be made to the VE.
Lowering the severity since this is now just an organize imports bug.
fixed in 358359
verified in 0.7.0.v20111019