else if ( e.getSource( ).equals( btnFilters ) ) { if ( getWizardContext( ).getDataServiceProvider( ) .invoke( IDataServiceProvider.COMMAND_EDIT_FILTER ) == Window.OK ) { refreshTablePreview( ); } }
	public void widgetSelected( SelectionEvent e )	{		if ( e.getSource( ).equals( btnUseReportData ) )		{			try			{				switchDataSet( null );			}			catch ( ChartException e1 )			{				e1.printStackTrace( );			}			tablePreview.createDummyTable( );			checkUseDataSet( false );		}		else if ( e.getSource( ).equals( btnUseDataSet ) )		{			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 )				{					DefaultLoggerImpl.instance( )							.log( DefaultLoggerImpl.ERROR,									Messages.getString( "TaskSelectData.Exception.UnableToSwitchToDataset" ) //$NON-NLS-1$											+ cmbDataSet.getText( ) );				}			}			checkUseDataSet( true );		}		else if ( e.getSource( ).equals( cmbDataSet ) )		{			try			{				ColorPalette.getInstance( ).restore( );				getCustomizeUI( ).selectLeftBindingArea( true, null );				getCustomizeUI( ).selectRightBindingArea( true, null );				getCustomizeUI( ).selectBottomBindingArea( true, null );				switchDataSet( cmbDataSet.getText( ) );			}			catch ( ChartException e1 )			{				DefaultLoggerImpl.instance( )						.log( DefaultLoggerImpl.ERROR,								Messages.getString( "TaskSelectData.Exception.UnableToSwitchToDataset" ) + cmbDataSet.getText( ) ); //$NON-NLS-1$			}		}		else if ( e.getSource( ).equals( btnNewData ) )		{			String[] sAllDS = getWizardContext( ).getDataServiceProvider( )					.getAllDataSets( );			String sCurrentDS = ""; //$NON-NLS-1$			if ( sAllDS.length > 0 )			{				sCurrentDS = getWizardContext( ).getDataServiceProvider( )						.getCurrentDataSet( );			}			getWizardContext( ).getDataServiceProvider( )					.invoke( IDataServiceProvider.COMMAND_NEW_DATASET );			sAllDS = ( (ChartWizardContext) context ).getDataServiceProvider( )					.getAllDataSets( );			// Update UI with DS list			cmbDataSet.setItems( sAllDS );			checkUseDataSet( true );			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 )				{					DefaultLoggerImpl.instance( )							.log( DefaultLoggerImpl.ERROR,									Messages.getString( "TaskSelectData.Exception.UnableToSwitchToDataset" ) + sAllDS[0] ); //$NON-NLS-1$				}			}		}		else if ( e.getSource( ).equals( btnFilters ) )		{			if ( getWizardContext( ).getDataServiceProvider( )					.invoke( IDataServiceProvider.COMMAND_EDIT_FILTER ) == Window.OK )			{				refreshTablePreview( );			}		}		else if ( e.getSource( ).equals( btnParameters ) )		{			if ( getWizardContext( ).getDataServiceProvider( )					.invoke( IDataServiceProvider.COMMAND_EDIT_PARAMETER ) == Window.OK )			{				refreshTablePreview( );			}		}		else if ( e.getSource( ) instanceof MenuItem )		{			MenuItem item = (MenuItem) e.getSource( );			IAction action = (IAction) item.getData( );			action.setChecked( !action.isChecked( ) );			action.run( );		}	}