Bug 316695 Refactor data set editor pages' codes[26568]
Build Identifier: 20100610 Refactor data set editor pages' codes[26568]. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java
ControlProvider.createLabel( parent, label );
			direction = ControlProvider.createCombo( parent, SWT.READ_ONLY );
			direction.setLayoutData( ControlProvider.getGridDataWithHSpan( 2 ) );
			direction.setItems( getDirections( ) );
			directionString = getDirectionDisplayName( structureHandle.isInput( ),
					structureHandle.isOutput( ) );
			direction.select( Utility.findIndex( direction.getItems( ),
					directionString ) );
			direction.addSelectionListener( new SelectionAdapter( ) {
				public void widgetSelected( SelectionEvent e )
				{
					if ( needsUpdateUI( ) )
					{
						directionString = direction.getText( );
						directionChanged( );
						validateSyntax( );
					}
				}
			} );
		}
		
		private boolean needsUpdateUI( )
		{
			if ( directionString.equals( direction.getText( ) ) )
				return false;
			if ( !directionString.equals( ParameterPageUtil.directions[1] )
					&& !isOutputParameter( ) )
				return false;
			return true;
		}