WizardBase.displayException( new RuntimeException( Messages.getFormattedString( "TaskSelectData.Warning.TypeCheck", new String[]{ expression, axis.getType( ).getName( ) } ) ) ); query.setDefinition( "" ); DataDefinitionTextManager.getInstance( ).updateText( query );
catch ( ChartException ce ) { if ( expression.trim( ).length( ) > 0 ) { Text text = DataDefinitionTextManager.getInstance( ) .findText( query ); if ( text != null ) {   text.setText( query.getDefinition( ) ); } WizardBase.displayException( new RuntimeException( Messages.getFormattedString( "TaskSelectData.Warning.TypeCheck", new String[]{ expression, sSeries } ) ) ); } query.setDefinition( "" ); DataDefinitionTextManager.getInstance( ).updateText( query ); }  if ( getChartModel( ) instanceof ChartWithAxes ) { DataType dataType = getDataServiceProvider( ).getDataType( expression ); SeriesDefinition sd = (SeriesDefinition) ( ChartUIUtil.getBaseSeriesDefinitions( getChartModel( ) ).get( 0 ) ); if ( sd!= null && sd.getGrouping( ).isEnabled( ) && ( sd.getGrouping( ) .getAggregateExpression( ) .equals( "Count" ) || sd.getGrouping( ) .getAggregateExpression( ) .equals( "DistinctCount" ) ) ) { dataType = DataType.NUMERIC_LITERAL; }  if ( isValidatedAxis( dataType, axis.getType( ) ) ) { break; }  AxisType[] axisTypes = provider.getCompatibleAxisType( series ); for ( int i = 0; i < axisTypes.length; i++ ) { if ( isValidatedAxis( dataType, axisTypes[i] ) ) { axisNotification( axis, axisTypes[i] ); axis.setType( axisTypes[i] ); break; } } }
	private void checkDataType( Query query )	{		String expression = query.getDefinition( );		Axis axis = null;		for ( EObject o = query; o != null; )		{			o = o.eContainer( );			if ( o instanceof Axis )			{				axis = (Axis) o;				break;			}		}		if ( expression.trim( ).length( ) > 0 && axis != null )		{			boolean b = getDataServiceProvider( ).checkDataType( expression,					axis.getType( ) );			if ( !b )			{				Text text = DataDefinitionTextManager.getInstance( )						.findText( query );				if ( text != null )				{					// Display the text even if it's useless and will be changed					text.setText( query.getDefinition( ) );				}				WizardBase.displayException( new RuntimeException( Messages.getFormattedString( "TaskSelectData.Warning.TypeCheck",//$NON-NLS-1$						new String[]{								expression, axis.getType( ).getName( )						} ) ) );				query.setDefinition( "" ); //$NON-NLS-1$				DataDefinitionTextManager.getInstance( ).updateText( query );			}		}	}