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
* (non-Javadoc)
		 * 
		 * @see org.eclipse.birt.report.designer.data.ui.dataset.
		 * PropertyHandleInputDialog#validateSemantics(java.lang.Object)
		 */
		protected IStatus validateSemantics( Object structureOrHandle )
		{
			Status status = updateStructureHandle( );
			if ( status != null && status.getSeverity( ) == IStatus.ERROR )
				return status;
			return getOKStatus( );
		}
		/*
		 * necessary in two scenarios 1. linkToSalarParameter 2. okPressed
		 */
		private Status updateStructureHandle( )
		{
			try
			{
				structureHandle.setName( dataSetParamName.getText( ) );
				structureHandle.setParameterDataType( ParameterPageUtil.getTypeName( dataType.getText( ) ) );
				setDirection( direction.getText( ) );
				if ( defaultValueText.isEnabled( ) )
					ExpressionButtonUtil.saveExpressionButtonControl( defaultValueText,
							structureHandle,
							DataSetParameter.DEFAULT_VALUE_MEMBER );
				if ( isOdaDataSetHandle )
					( (OdaDataSetParameterHandle) structureHandle ).setParamName( Utility.findIndex( linkToSalarParameter.getItems( ),
							linkToSalarParameter.getText( ) ) == 0 ? null
							: linkToSalarParameter.getText( ) );