private void addMenu( IMenuManager manager, Object item ) { if ( item instanceof IAction ) { manager.add( (IAction) item ); } else if ( item instanceof IContributionItem ) { manager.add( (IContributionItem) item ); } } } );  Menu menu = menuManager.createContextMenu( tablePreview ); menu.setVisible( true );
}
	public void handleEvent( Event event )	{		if ( event.type == CustomPreviewTable.MOUSE_RIGHT_CLICK_TYPE				&& ( getDataServiceProvider( ).getBoundDataSet( ) != null || getDataServiceProvider( ).getReportDataSet( ) != null ) )		{			MenuManager menuManager = new MenuManager( );			menuManager.setRemoveAllWhenShown( true );			menuManager.addMenuListener( new IMenuListener( ) {				public void menuAboutToShow( IMenuManager manager )				{					addMenu( manager, new HeaderShowAction( ) );					addMenu( manager, getBaseSeriesMenu( getChartModel( ) ) );					addMenu( manager,							getOrthogonalSeriesMenu( getChartModel( ) ) );					addMenu( manager, getGroupSeriesMenu( getChartModel( ) ) );					// manager.add( actionInsertAggregation );				}				private void addMenu( IMenuManager manager, Object item )				{					if ( item instanceof IAction )					{						manager.add( (IAction) item );					}					else if ( item instanceof IContributionItem )					{						manager.add( (IContributionItem) item );					}				}			} );			Menu menu = menuManager.createContextMenu( tablePreview );			menu.setVisible( true );		}	}