expressions = Generator.instance( ).getRowExpressions( chart );
expressions = Generator.instance( ).getRowExpressions( chart, null );
	public static void doLivePreview( Chart chart,			IDataServiceProvider dataProvider ) throws ChartException	{		final List expressions;		final Object[] columnData;		expressions = Generator.instance( ).getRowExpressions( chart );		columnData = dataProvider.getDataForColumns( (String[]) expressions.toArray( new String[0] ),				-1,				false );		final Map map = new HashMap( );		for ( int i = 0; i < expressions.size( ); i++ )		{			map.put( expressions.get( i ), columnData[i] );		}		IDataRowExpressionEvaluator evaluator = new IDataRowExpressionEvaluator( ) {			private int i;			private Object[] column;			public Object evaluate( String expression )			{				column = (Object[]) map.get( expression );				if ( i >= column.length )				{					throw new RuntimeException( new ChartException( ChartUIPlugin.ID,							ChartException.DATA_SET,							Messages.getString( "ChartUIUtil.Exception.NoValueReturned" ) ) ); //$NON-NLS-1$				}				return column[i];			}			public void first( )			{				i = 0;			}			public boolean next( )			{				if ( column != null && i < column.length - 1 )				{					i++;					return true;				}				return false;			}			public void close( )			{				// no-op			}		};		RunTimeContext context = new RunTimeContext( );		context.setLocale( Locale.getDefault( ) );		Generator.instance( ).bindData( evaluator, chart, context );		// Original live preview code: use sample data. See TaskSelectData		// oldSample = (SampleData) EcoreUtil.copy( getChartModel(		// ).getSampleData( ) );		// SampleData newSample = updateSampleData( oldSample );		// ADD ALL ADAPTERS...AND REFRESH PREVIEW		// newSample.eAdapters( ).addAll( getChartModel( ).eAdapters( ) );		// getChartModel( ).setSampleData( newSample );	}