container.displayException( e1 );
ChartWizard.displayException( e1 );
	public void widgetSelected( SelectionEvent e )	{		if ( e.getSource( ).equals( btnUseReportData ) )		{			// Skip when selection is false			if ( !btnUseReportData.getSelection( ) )			{				return;			}			try			{				switchDataSet( null );			}			catch ( ChartException e1 )			{				container.displayException( e1 );			}			cmbDataSet.setEnabled( false );			btnNewData.setEnabled( false );			btnFilters.setEnabled( hasDataSet( ) );			btnParameters.setEnabled( hasDataSet( ) );		}		else if ( e.getSource( ).equals( btnUseDataSet ) )		{			// Skip when selection is false			if ( !btnUseDataSet.getSelection( ) )			{				return;			}			if ( cmbDataSet.getText( ).length( ) == 0 )			{				cmbDataSet.setItems( getWizardContext( ).getDataServiceProvider( )						.getAllDataSets( ) );				cmbDataSet.select( 0 );			}			if ( cmbDataSet.getText( ).length( ) != 0 )			{				try				{					switchDataSet( cmbDataSet.getText( ) );				}				catch ( ChartException e1 )				{					container.displayException( e1 );				}			}			cmbDataSet.setEnabled( true );			btnNewData.setEnabled( true );			btnFilters.setEnabled( hasDataSet( ) );			btnParameters.setEnabled( hasDataSet( ) );		}		else if ( e.getSource( ).equals( cmbDataSet ) )		{			try			{				ColorPalette.getInstance( ).restore( );				switchDataSet( cmbDataSet.getText( ) );			}			catch ( ChartException e1 )			{				container.displayException( e1 );			}		}		else if ( e.getSource( ).equals( btnNewData ) )		{			String[] sAllDS = getWizardContext( ).getDataServiceProvider( )					.getAllDataSets( );			String sCurrentDS = ""; //$NON-NLS-1$			if ( sAllDS.length > 0 )			{				sCurrentDS = getWizardContext( ).getDataServiceProvider( )						.getBoundDataSet( );			}			getWizardContext( ).getDataServiceProvider( )					.invoke( IDataServiceProvider.COMMAND_NEW_DATASET );			sAllDS = ( (ChartWizardContext) context ).getDataServiceProvider( )					.getAllDataSets( );			// Update UI with DS list			cmbDataSet.setItems( sAllDS );			if ( sCurrentDS.length( ) > 0 )			{				cmbDataSet.setText( sCurrentDS );			}			else if ( sAllDS.length > 0 )			{				// If at least one dataset is defined in the report design...AND				// if a dataset had not already been bound to the chart...				// bind the first dataset in the list to the chart				cmbDataSet.setText( sAllDS[0] );				try				{					switchDataSet( sAllDS[0] );				}				catch ( ChartException e1 )				{					container.displayException( e1 );				}			}		}		else if ( e.getSource( ).equals( btnFilters ) )		{			if ( getWizardContext( ).getDataServiceProvider( )					.invoke( IDataServiceProvider.COMMAND_EDIT_FILTER ) == Window.OK )			{				refreshTablePreview( );				doLivePreview( );			}		}		else if ( e.getSource( ).equals( btnParameters ) )		{			if ( getWizardContext( ).getDataServiceProvider( )					.invoke( IDataServiceProvider.COMMAND_EDIT_PARAMETER ) == Window.OK )			{				refreshTablePreview( );				doLivePreview( );			}		}		else if ( e.getSource( ) instanceof MenuItem )		{			MenuItem item = (MenuItem) e.getSource( );			IAction action = (IAction) item.getData( );			action.setChecked( !action.isChecked( ) );			action.run( );		}	}