Bug 316568 Refactor data set editor pages' codes[26849]
Build Identifier: 20100610 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/Utility.java
public static List getAllParameters( )
	{
		List parameterList = SessionHandleAdapter.getInstance( )
				.getReportDesignHandle( )
				.getAllParameters( );
		return parameterList;
	}
    
	/**
	 * 
	 * @param name
	 * @return
	 */
	public static ScalarParameterHandle getScalarParameter( String name )
	{
		if ( name == null )
			return null;
		List parameterList = getAllParameters( );
		Object parameterObject = null;
		for ( int i = 0; i < parameterList.size( ); i++ )
		{
			parameterObject = parameterList.get( i );
			if ( parameterObject instanceof ScalarParameterHandle )
			{
				if ( name.equals( ( (ScalarParameterHandle) parameterObject ).getQualifiedName( ) ) )
					return (ScalarParameterHandle) parameterObject;
			}
		}
		return null;
	}