Bug 207733 NPE when drag cube dimension from library to report[1101]
Description: NPE when drag cube dimension from library to report Build number:2.2.2.v20071029 Steps to reproduce: 1. New a libray with a valid cube. 2. New a report. 3. Use the library in report. 4. Drag dimension in library cube from library explorer to report Layout. Expected result: Forbidden this DND action. Actual result: NPE Error log: java.lang.NullPointerException at org.eclipse.birt.report.item.crosstab.internal.ui.editors.commands.CreateDimensionViewCommand.execute(CreateDimensionViewCommand.java:145) 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: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:199) 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:358) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:284) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:168) 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:169) 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:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
UI/org.eclipse.birt.report.designer.ui.lib.explorer/src/org/eclipse/birt/report/designer/ui/lib/explorer/dnd/LibraryDragListener.java
{
	public LibraryDragListener( StructuredViewer viewer )
	{
		super( viewer );
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.designer.internal.ui.dnd.DesignElementDragAdapter#validateTransfer(java.lang.Object)
	 */
	protected boolean validateTransfer( Object transfer )
	{
		if ( transfer instanceof ReportElementHandle