Bug 155646 [Regression] AssertionFailedException is thrown out when republish a library
Description: AssertionFailedException is thrown out by following steps. Steps to reproduce: 1. New a blank library, publish it 2. Add something to the library, save it, republish it Expected result: The library can be published Actual result: AssertionFailedException is thrown out, can't publish any library until you restart eclipse Error log: org.eclipse.jface.util.Assert$AssertionFailedException: Assertion failed: ContentViewer must have a content provider when input is set. at org.eclipse.jface.util.Assert.isTrue(Assert.java:182) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:242) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1542) at org.eclipse.birt.report.designer.ui.lib.explorer.LibraryExplorerTreeViewPage.refreshRoot(LibraryExplorerTreeViewPage.java:259) at org.eclipse.birt.report.designer.ui.lib.explorer.LibraryExplorerTreeViewPage.resourceChanged(LibraryExplorerTreeViewPage.java:295) at org.eclipse.birt.report.model.core.DesignSession.broadcastResourceChangeEvent(DesignSession.java:1039) at org.eclipse.birt.report.model.core.DesignSession.fireLibChange(DesignSession.java:981) at org.eclipse.birt.report.model.api.SessionHandle.fireResourceChange(SessionHandle.java:741) at org.eclipse.birt.report.designer.internal.ui.wizards.PublishLibraryWizard.fireDesigFileChangeEvent(PublishLibraryWizard.java:221) at org.eclipse.birt.report.designer.internal.ui.wizards.PublishLibraryWizard.publishiLibrary(PublishLibraryWizard.java:208) at org.eclipse.birt.report.designer.internal.ui.wizards.PublishLibraryWizard.performFinish(PublishLibraryWizard.java:131) 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.ide.navigator.PublishLibraryNavigatorAction.run(PublishLibraryNavigatorAction.java:100) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254) 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(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.lib.explorer/src/org/eclipse/birt/report/designer/ui/lib/explorer/LibraryExplorerTreeViewPage.java
treeViewer = new TreeViewer( parent, SWT.MULTI
				| SWT.H_SCROLL
				| SWT.V_SCROLL );
		configTreeViewer( );
		initPage( );
		refreshRoot( );
		return treeViewer;
	}
	/**
	 * Configures the tree viewer.
	 */
	protected void configTreeViewer( )
	{
		ViewsTreeProvider provider = new LibraryExplorerProvider( );
		treeViewer.setContentProvider( provider );
		treeViewer.setLabelProvider( provider );
		
		int ops = DND.DROP_COPY;
		Transfer[] transfers = new Transfer[]{
			TemplateTransfer.getInstance( )
		};
		treeViewer.addDragSupport( ops,
				transfers,
				new LibraryDragListener( treeViewer ) );
		treeViewer.getControl( ).addKeyListener( new KeyListener( ) {
			public void keyPressed( KeyEvent e )
			{
			}
			public void keyReleased( KeyEvent e )
			{