Bug 322347 Refactor data set editor pages' codes[29949]
Build Identifier: 20100810 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/OutputColumnDefnPage.java
columnHintMap.clear( );
		rsColumnMap.clear( );
		for ( Iterator iterator = columnHints.iterator( ); iterator.hasNext( ); )
		{
			ColumnHintHandle handle = (ColumnHintHandle) iterator.next( );
			columnHintMap.put( handle.getColumnName( ), handle.getStructure( ) );
		}
		IStructure toDelete = null;
		if ( rsColumns == null )
			return;
		for ( Iterator iterator = rsColumns.iterator( ); iterator.hasNext( ); )
		{
			ResultSetColumnHandle handle = (ResultSetColumnHandle) iterator.next( );
			if ( columnHintMap.get( handle.getColumnName( ) ) == null )
			{
				toDelete = handle.getStructure( );
				continue;
			}
			rsColumnMap.put( handle.getColumnName( ), handle.getStructure( ) );
		}
		if ( toDelete != null )
		{
			try
			{
				rsColumns.removeItem( toDelete );
			}
			catch ( PropertyValueException e )
			{
				ExceptionHandler.handle( e );
			}