Bug 321474 Refactor data set editor pages' codes[28816]
Build Identifier: 20100729 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/DataSetProvider.java
String defaultAnalysisType = null;
		if ( !this.needToFocusOnOutput )
			return originalAnalysis;
		if ( originalAnalysis != null )
			return originalAnalysis;
		if ( dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER )
				|| dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT )
				|| dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL ) )
		{
			defaultAnalysisType = DesignChoiceConstants.ANALYSIS_TYPE_MEASURE;
		}
		else if ( dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_STRING ) )
		{
			defaultAnalysisType = DesignChoiceConstants.ANALYSIS_TYPE_ATTRIBUTE;
		}
		else if ( dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_TIME )
				|| dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_DATE )
				|| dataType.equals( DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME ) )
		{
			defaultAnalysisType = DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
		}
		if ( columnName.length( ) >= 3 )
		{
			String lastThreeLetters = columnName.substring( columnName.length( ) - 3 );
			if ( lastThreeLetters.equalsIgnoreCase( "key" ) )
			{
				defaultAnalysisType = DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
			}
		}
		if ( columnName.length( ) >= 2 )