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
int index = viewer.getViewer( ).getTable( ).getSelectionIndex( );
			viewer.getUpButton( ).setEnabled( index != 0 );
			viewer.getDownButton( ).setEnabled( index != ( viewer.getViewer( ).getTable( )
					.getItemCount( ) - 1 ) );
		}
		else
		{
			viewer.getEditButton( ).setEnabled( false );
			viewer.getUpButton( ).setEnabled( false );
			viewer.getRemoveButton( ).setEnabled( false );
			viewer.getDownButton( ).setEnabled( false );
			viewer.getRemoveMenuItem( ).setEnabled( false );
		}
	}
	protected void setTableContentProvider( )
	{
		viewer.getViewer( )
				.setContentProvider( new IStructuredContentProvider( ) {
					public Object[] getElements( Object inputElement )
					{
						if ( inputElement == null
								|| !( inputElement instanceof ColumnHandles ) )
							return new Object[0];
						
						return ( ( ColumnHandles )inputElement ).getColumnDefn( ).toArray( );
					}
					public void dispose( )
					{
					}
					public void inputChanged( Viewer viewer, Object oldInput,