Project: Birt
Bug 273366 Exception is thrown out when you select format for text item.
Reported: 2009-04-22 22:32:11 | Status: verified fixed

description: Exception is thrown out when you select format for text item. build id: 2.5.0 v20090422-0630 steps to reproduce: 1. Insert a text. 2. Click the list of list box, select a format and click OK. Actual result: Value of does not work and exception throws out in error log. Error log: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String; at org.eclipse.birt.report.designer.ui.dialogs.TextEditor.insertFormat(TextEditor.java:1169) at org.eclipse.birt.report.designer.ui.dialogs.TextEditor.access$13(TextEditor.java:1165) at org.eclipse.birt.report.designer.ui.dialogs.TextEditor$14.widgetSelected(TextEditor.java:1139) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770) at org.eclipse.swt.custom.CCombo.listEvent(CCombo.java:1046) at org.eclipse.swt.custom.CCombo$1.handleEvent(CCombo.java:115) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.birt.report.designer.ui.dialogs.BaseDialog.open(BaseDialog.java:110) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.TextEditPart.performDirectEdit(TextEditPart.java:57) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.ReportElementEditPart.performRequest(ReportElementEditPart.java:149) at org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:187) at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:131) at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:955) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.tools.ReportElementDragTracker.mouseDoubleClick(ReportElementDragTracker.java:125) at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:501) at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:208) at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:285) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:508) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:183) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/TextEditor.java