Bug 165594 [Smoke]Can't create a script data set using script data source[0704]
Can't create a script data set using script data source Build number: 2.2.0.v20061123-0710 Steps to reproduce: 1.new a script data source 2.new a script data set Expected result: can create a script data set Actual result: can't create a script data set Error log: java.lang.NullPointerException at org.eclipse.birt.report.designer.ui.views.ElementAdapterManager.getAdapters(ElementAdapterManager.java:225) at org.eclipse.birt.report.designer.ui.views.ElementAdapterManager.getAdatper(ElementAdapterManager.java:182) at org.eclipse.birt.report.designer.ui.views.ProviderFactory.createProvider(ProviderFactory.java:50) at org.eclipse.birt.report.designer.internal.ui.editors.script.JSEditor.updateAnnotationLabel(JSEditor.java:374) at org.eclipse.birt.report.designer.internal.ui.editors.script.JSEditor.handleSelectionChanged(JSEditor.java:607) at org.eclipse.birt.report.designer.internal.ui.editors.script.JSEditor.handleSelectionChanged(JSEditor.java:539) at org.eclipse.birt.report.designer.internal.ui.editors.script.JSEditor.handleSelectionChange(JSEditor.java:869) at org.eclipse.birt.report.designer.internal.ui.editors.script.JSEditor.performRequest(JSEditor.java:828) at org.eclipse.birt.report.designer.core.util.mediator.ReportMediator.notifyRequest(ReportMediator.java:125) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewPage.fireSelectionChanged(DataViewPage.java:166) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewPage.treeSelect(DataViewPage.java:142) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewPage$1.selectionChanged(DataViewPage.java:66) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1577) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewTreeViewerPage.expandNodeAfterCreation(DataViewTreeViewerPage.java:418) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewTreeViewerPage.elementChanged(DataViewTreeViewerPage.java:330) at org.eclipse.birt.report.model.core.DesignElement.broadcast(DesignElement.java:799) at org.eclipse.birt.report.model.activity.NotificationRecordTask.doTask(NotificationRecordTask.java:277) at org.eclipse.birt.report.model.activity.ActivityRecord.performPostTasks(ActivityRecord.java:511) at org.eclipse.birt.report.model.activity.ActivityStack.execute(ActivityStack.java:346) at org.eclipse.birt.report.model.command.ContentCommand.doAdd(ContentCommand.java:240) at org.eclipse.birt.report.model.command.ContentCommand.add(ContentCommand.java:137) at org.eclipse.birt.report.model.api.SlotHandle.add(SlotHandle.java:122) at org.eclipse.birt.report.model.api.SlotHandle.add(SlotHandle.java:81) at org.eclipse.birt.report.designer.data.ui.dataset.DefaultDataSetWizard.createSelectedDataSetTearDown(DefaultDataSetWizard.java:134) at org.eclipse.birt.report.designer.data.ui.dataset.DefaultDataSetWizard.performFinish(DefaultDataSetWizard.java:95) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355) at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660) 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.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.run(NewDataSetAction.java:123) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.editors.schematic/src/org/eclipse/birt/report/designer/internal/ui/editors/script/JSEditor.java
* @return source viewer
	 */
	public SourceViewer getViewer( )
	{
		return (SourceViewer) getSourceViewer( );
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.designer.core.util.mediator.IColleague#performRequest(org.eclipse.birt.report.designer.core.util.mediator.request.ReportRequest)
	 */
	public void performRequest( ReportRequest request )
	{
		if ( ReportRequest.SELECTION.equals( request.getType( ) ) )
		{
			handleSelectionChange( request.getSelectionModelList( ) );
		}
		if ( ReportRequest.CREATE_ELEMENT.equals( request.getType( ) )
				&& request.getSelectionModelList( ).get( 0 ) instanceof ScriptDataSourceHandle )
		{
			handleSelectionChange( request.getSelectionModelList( ) );
		}
	}
	private void setComboViewerInput( Object model )
	{
		cmbExprListViewer.setInput( model );
		Object oldSelection = selectionMap.get( model );
		if ( oldSelection == null )
		{
			selectItemInComboExpList( new StructuredSelection( ) );