Project: Birt
Bug 182473 [Smoke]Can not drag a report item into layout[00]
Reported: 2007-04-15 20:57:44 | Status: closed fixed

Steps to reproduce: new a report design drag a report item into layout Expected result: report item is shown in the layout view Actual result: nothing else except an error message in the error log Error log: java.lang.ClassCastException: java.lang.String at org.eclipse.birt.report.designer.core.commands.CreateCommand.getNewObject(CreateCommand.java:163) at org.eclipse.birt.report.designer.core.commands.CreateCommand.execute(CreateCommand.java:58) at org.eclipse.birt.report.designer.internal.ui.command.WrapperCommandStack.execute(WrapperCommandStack.java:86) at org.eclipse.birt.report.item.crosstab.internal.ui.dnd.MeasureHandleDropAdapter.performDrop(MeasureHandleDropAdapter.java:78) at org.eclipse.birt.report.designer.internal.ui.dnd.DNDService.performDrop(DNDService.java:178) at org.eclipse.birt.report.designer.internal.ui.palette.ReportTemplateTransferDropTargetListener.handleDrop(ReportTemplateTransferDropTargetListener.java:115) at org.eclipse.gef.dnd.AbstractTransferDropTargetListener.drop(AbstractTransferDropTargetListener.java:171) at org.eclipse.jface.util.DelegatingDropAdapter$3.run(DelegatingDropAdapter.java:211) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:850) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:45) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:153) at org.eclipse.jface.util.DelegatingDropAdapter.drop(DelegatingDropAdapter.java:209) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706) at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:413) at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:237) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:322) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:281) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:165) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2337) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2301) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2176) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:463) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:458) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:356) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:171) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1141)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dnd/DNDService.java xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/dnd/MeasureHandleDropAdapter.java