else if ( e.getSource( ).equals( btnGroup ) ) { SeriesDefinition sdBackup = (SeriesDefinition) EcoreUtil.copy( seriesdefinition ); GroupSortingDialog groupDialog = new GroupSortingDialog( cmpTop.getShell( ), context, sdBackup );  if ( groupDialog.open( ) == Window.OK ) { if ( !sdBackup.eIsSet( DataPackage.eINSTANCE.getSeriesDefinition_Sorting( ) ) ) { seriesdefinition.eUnset( DataPackage.eINSTANCE.getSeriesDefinition_Sorting( ) ); } else { seriesdefinition.setSorting( sdBackup.getSorting( ) ); } seriesdefinition.setGrouping( sdBackup.getGrouping( ) ); seriesdefinition.getGrouping( ) .eAdapters( ) .addAll( seriesdefinition.eAdapters( ) ); } }
	public void widgetSelected( SelectionEvent e )	{		if ( e.getSource( ).equals( btnBuilder ) )		{			try			{				String sExpr = context.getUIServiceProvider( )						.invoke( IUIServiceProvider.COMMAND_EXPRESSION,								txtDefinition.getText( ),								context.getExtendedItem( ),								sTitle );				txtDefinition.setText( sExpr );				query.setDefinition( sExpr );			}			catch ( ChartException e1 )			{				WizardBase.displayException( e1 );			}		}		else if ( e.getSource( ).equals( btnFormatEditor ) )		{			FormatSpecifier formatspecifier = seriesdefinition.getFormatSpecifier( );			FormatSpecifierDialog editor = new FormatSpecifierDialog( cmpTop.getShell( ),					formatspecifier,					sTitle );			if ( editor.open( ) == Window.OK )			{				if ( editor.getFormatSpecifier( ) == null )				{					seriesdefinition.eUnset( DataPackage.eINSTANCE.getSeriesDefinition_FormatSpecifier( ) );				}				else				{					seriesdefinition.setFormatSpecifier( editor.getFormatSpecifier( ) );				}			}		}	}