Bug 199831 Exception is thrown out when drag one data set column to cross tab rows field [1102]
Description: Exception is thrown out when drag one data set column to cross tab rows field. Build number: 2.2.1.v200708014-0630 Steps to reproduce: 1. New a cube and a crosstab, drag dimension to crosstab rows field. 2. Drag a data set column from the Data Explorer View to crosstab rows field. Expected result: No exception is thrown out. Actual result: Exception is thrown out. Error log: java.lang.ClassCastException: org.eclipse.birt.report.model.api.ResultSetColumnHandle at org.eclipse.birt.report.item.crosstab.internal.ui.editors.commands.CrosstabCellCreateCommand.getNewObject(CrosstabCellCreateCommand.java:121) at org.eclipse.birt.report.item.crosstab.internal.ui.editors.commands.CrosstabCellCreateCommand.execute(CrosstabCellCreateCommand.java:59) at org.eclipse.birt.report.designer.internal.ui.command.WrapperCommandStack.execute(WrapperCommandStack.java:86) at org.eclipse.birt.report.item.crosstab.internal.ui.dnd.DataColumnXTabDropAdapter.performDrop(DataColumnXTabDropAdapter.java:123) at org.eclipse.birt.report.designer.internal.ui.dnd.DNDService.performDrop(DNDService.java:195) at org.eclipse.birt.report.designer.internal.ui.dnd.DNDService.performDrop(DNDService.java:183) 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:857) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193) 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:414) at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:237) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119) 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:282) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:166) 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:3682) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) 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:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) 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:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/dnd/DataColumnXTabDropAdapter.java
else
			{
				CommandStack stack = getActionStack( );
				stack.startTrans( "Create a cube for binding the crossTab" ); 
				try
				{
					ResultSetColumnHandle columnHandle = getColumnHandle( transfer );
					if ( columnHandle != null )
					{
						DataSetHandle dataSetHandle = (DataSetHandle) columnHandle.getElementHandle( );
						TabularCubeHandle newCube = DesignElementFactory.getInstance( )
								.newTabularCube( Messages.getString("DataColumnXTabDropAdapter.DataCube") + " - " +dataSetHandle.getName( ));
						SessionHandleAdapter.getInstance( )
								.getReportDesignHandle( )
								.getCubes( )
								.add( newCube );
						SimpleCubeBuilder builder = new SimpleCubeBuilder( PlatformUI.getWorkbench( )
								.getDisplay( )
								.getActiveShell( ) );
						builder.setInput( newCube, dataSetHandle );
						if ( builder.open( ) == Window.OK )
						{
							if ( handle != null )
							{
								handle.setProperty( IReportItemModel.CUBE_PROP,
										newCube );
							}
							stack.commit( );
							ReportRequest request = new ReportRequest( ReportRequest.CREATE_ELEMENT );
							List selectionObjects = new ArrayList( );