String type = tablesRs.getString("TABLE_TYPE");
	protected void populateTableList()	{		 // Remove all the existing children of the root Node		 if ( rootNode != null )		 {		 	availableDbObjectsTree.removeAll();		 	setRootElement();		 }		  String namePattern = null;		  String[] tableType = null;		  		  if ( searchTxt.getText().length() > 0 )		  {		  	namePattern = searchTxt.getText();		  	// Add the % by default if there is no such pattern		  	if ( namePattern != null )		  	{		  		if ( namePattern.lastIndexOf('%') == -1)		  		{		  			namePattern = namePattern + "%";		  		}		  	}		  }		  		  String dbtype = getSelectedDbType();		  if ( dbtype != null && ! DbType.ALL_STRING.equalsIgnoreCase(dbtype))		  {		  	tableType = new String[]{ dbtype };		  }		  	    String catalogName = metaDataProvider.getCatalog();		ArrayList tableList = new ArrayList();		ArrayList targetSchemaList = new ArrayList();					if (schemaList != null && schemaList.size() > 0)		{			if ( schemaCombo.getSelectionIndex() == 0)			{				targetSchemaList = schemaList;			}			else			{				targetSchemaList.add( schemaCombo.getItem( schemaCombo.getSelectionIndex() ));			}						ResultSet tablesRs = null;			// For each schema Get  the List of Tables			int numTables = 0;			//if ( schemaComboViewer.getSelection().)				for( int i=0; i< targetSchemaList.size(); i++)			{				int count = 0;				String schemaName = (String)targetSchemaList.get(i);				tablesRs = metaDataProvider.getAlltables(catalogName,schemaName,namePattern,tableType);				tableList = new ArrayList();				if( tablesRs == null )				{					continue;				}					try				{					// Create the schema Node					ArrayList schema = new ArrayList();					TreeItem schemaTreeItem[] = null;					Image image = tableImage;										if( count == 0 )					{						schema.add(schemaName);						schemaTreeItem = Utility.createTreeItems(rootNode, schema, SWT.NONE, schemaImage);						//expand schema TreeItem						if( schemaTreeItem != null && schemaTreeItem.length > 0)							availableDbObjectsTree.showItem(schemaTreeItem[0]);					}										while( tablesRs.next()) 					{						if ( tablesRs.getString("TABLE_TYPE").equalsIgnoreCase("SYSTEM TABLE"))							continue;						count++;//						String SchemaName = tablesRs.getString("TABLE_SCHEM");//$NON-NLS-1$						String tableName = tablesRs.getString("TABLE_NAME");//$NON-NLS-1$						String type = tablesRs.getString("TABLE_TYPE");//$NON-NLS-1$												int dbType = DbObject.TABLE_TYPE;										if(type.equalsIgnoreCase("TABLE"))						{							image = tableImage;							dbType = DbObject.TABLE_TYPE;						}						else if(type.equalsIgnoreCase("VIEW"))						{							image = viewImage;							dbType = DbObject.VIEW_TYPE;						}												String fullyQualifiedTableName = tableName;						if( schemaName != null && schemaName.trim().length() > 0)						{							fullyQualifiedTableName = schemaName + "." + tableName;						}						DbObject dbObject = new DbObject(fullyQualifiedTableName,tableName, dbType, image);						tableList.add(dbObject);						numTables ++;											}										if ( schemaTreeItem != null 							&& schemaTreeItem.length > 0 ) 					{						TreeItem item[] = Utility.createTreeItems( schemaTreeItem[0],								tableList,								SWT.NONE,								null );						//expand table TreeItem						if ( expandDbObjectsTree && item != null && item.length > 0 )						{							availableDbObjectsTree.showItem( item[0] );						}					}														}				catch(SQLException e)				{					e.printStackTrace();				}			}		}		else		{			//ResultSet tablesRs = metaDataProvider.getAlltables(catalogName,null,namePattern,tableType);			ResultSet tablesRs = metaDataProvider.getAlltables(catalogName,null,namePattern,tableType);			if( tablesRs == null)			{				return;			}			try			{				Image image = tableImage;				while( tablesRs.next())				{					if ( tablesRs.getString("TABLE_TYPE").equalsIgnoreCase("SYSTEM TABLE"))						continue;	//				String SchemaName = tablesRs.getString("TABLE_SCHEM");//$NON-NLS-1$					String tableName = tablesRs.getString("TABLE_NAME");//$NON-NLS-1$					String type = tablesRs.getString("TABLE_TYPE");//$NON-NLS-1$					int dbType = DbObject.TABLE_TYPE;													if(type.equalsIgnoreCase("TABLE"))					{						image = tableImage;						dbType = DbObject.TABLE_TYPE;					}					else if(type.equalsIgnoreCase("VIEW"))					{						image = viewImage;						dbType = DbObject.VIEW_TYPE;					}										DbObject dbObject = new DbObject(tableName, tableName,dbType, image);					tableList.add(dbObject);				}								TreeItem item[] = Utility.createTreeItems(rootNode, tableList, SWT.NONE, null);								//expand table TreeItem				if( item != null && item.length > 0)					availableDbObjectsTree.showItem(item[0]);								// Add listener to display the column names when expanded			}			catch(Exception e)			{				e.printStackTrace();			}								}			// Add a listener for fetching columns	   addFetchColumnListener();  	}