Bug 154827 SWTError is thrown out after following steps
Description: SWTError is thrown out after following steps Steps to reproduce: 1. New a report 2. Switch to Script tab in Editor view 3. Close Palette view 4. Reopen Palette view Expected result: Can reopen Palette view Actual result: SWTError is thrown out, and Palette view can't show up Error log: org.eclipse.swt.SWTError: Cannot initialize Drop at org.eclipse.swt.dnd.DND.error(DND.java:247) at org.eclipse.swt.dnd.DND.error(DND.java:208) at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:130) at org.eclipse.birt.report.designer.internal.ui.dialogs.ExpressionTreeSupport.addDropSupportToViewer(ExpressionTreeSupport.java:655) at org.eclipse.birt.report.designer.internal.ui.editors.script.TreeViewPalettePage.createControl(TreeViewPalettePage.java:86) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.ReportMultiBookPage.setActivePage(ReportMultiBookPage.java:198) at org.eclipse.birt.report.designer.ui.editors.MultiPageReportEditor.updatePaletteView(MultiPageReportEditor.java:516) at org.eclipse.birt.report.designer.ui.editors.MultiPageReportEditor.updateRelatedViews(MultiPageReportEditor.java:612) at org.eclipse.birt.report.designer.ui.editors.MultiPageReportEditor.pageChange(MultiPageReportEditor.java:547) at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:232) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ExpressionTreeSupport.java
if ( event.detail != DND.DROP_COPY )
					event.detail = DND.DROP_NONE;
			}
			public void dragOver( DropTargetEvent event )
			{
				event.feedback = DND.FEEDBACK_SCROLL
						| DND.FEEDBACK_INSERT_BEFORE;
			}
			public void dragOperationChanged( DropTargetEvent event )
			{
				dragEnter( event );
			}
			public void drop( DropTargetEvent event )
			{
				if ( event.data instanceof String )
					insertText( (String) event.data );
			}
		} );
	}
	/**
	 * Disposes resources.
	 * 
	 */
	public void dispose( )
	{
		if ( dropTarget != null && !dropTarget.isDisposed( ) )
		{
			dropTarget.dispose( );
		}
	}