Project: Birt
Bug 235510 Eventhandler doesn't work if the project is created from a existing project
Reported: 2008-06-03 23:30:39 | Status: closed fixed

Description: Eventhandler doesn't work if the project is created from a existing project Build number: 2.3.0.v20080604-0630 Steps to reproduce: 1, New a java project 2, Create a class extends LabelEventAdapter and implement onPrepare(). 3, New another java project created from the project in step1 4, New a lable and using the eventhandler in the second project 5, Preview Expected result: The eventhandler from the project which is created from a existing project works Actual result: Exception throws out. Error log: Error.ScriptClassCastError ( 4 time(s) ) detail : org.eclipse.birt.report.engine.api.EngineException: Class com.labelscript.LabelTest does not implement the org.eclipse.birt.report.engine.api.script.eventhandler.IAutoTextEventHandler interface. at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:201) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addClassCastException(ScriptExecutor.java:162) at org.eclipse.birt.report.engine.script.internal.LabelScriptExecutor.getEventHandler(LabelScriptExecutor.java:152) at org.eclipse.birt.report.engine.script.internal.LabelScriptExecutor.handleOnPrepare(LabelScriptExecutor.java:34) at org.eclipse.birt.report.engine.api.impl.ScriptedDesignHandler.handleOnPrepare(ScriptedDesignHandler.java:154) at org.eclipse.birt.report.engine.api.impl.ScriptedDesignVisitor.visitLabel(ScriptedDesignVisitor.java:270) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitLabel(DesignVisitor.java:969) at org.eclipse.birt.report.model.elements.Label.apply(Label.java:60) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.api.impl.ScriptedDesignVisitor.visitReportDesign(ScriptedDesignVisitor.java:106) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitReportDesign(DesignVisitor.java:1175) at org.eclipse.birt.report.model.elements.ReportDesign.apply(ReportDesign.java:89) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.api.impl.EngineTask.prepareDesign(EngineTask.java:1310) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:89) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:72)

Files changed in fix:
UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/internal/ui/launcher/util/WorkspaceClassPathFinder.java