Bug 199021 Error message pops up several times when click an invalid dataset
Description: There is a sqlserver datasource and dataset, remove the jtds driver to let the dataset invalid. Double click on the dataset, the error message will pop up serveral times. Build version:2.2.0.v20070807-0630 Steps to reproduce: 1. Create a sqlserver datasource and dataset. 2. Remove the jtds driver, and the dataset will be invalid. 3. Double click on the dataset. Expect result: Error message pops up once to indicate the problem. Actual result: Error message pops up serveral times.
data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java
public void setDatabaseObjectTreeExpansion( boolean expand )
	{
		this.expandDbObjectsTree = expand;
	}
	/**
	 * remove the tree item's direct child treeItem, cause since 3.1,
	 * TreeItem.removeAll is supported.But in 3.0,this method is not supported.
	 * 
	 * @param treeItem
	 */
	private void removeTreeItem( TreeItem treeItem )
	{
		if ( treeItem.isDisposed( ) )
			return;
		TreeItem[] items = treeItem.getItems( );
		for ( int i = 0; i < items.length; i++ )
		{
			if ( items[i] != null && !items[i].isDisposed( ) )
			{
				items[i].dispose( );
			}
		}
	}
}
class DbType
{
	public static final int TABLE_TYPE = 0;
	public static final String TABLE_STRING = "TABLE";
	public static final int VIEW_TYPE = 1;
	public static final String VIEW_STRING = "VIEW";