Buggy code:
public abstract class FilteredPreferenceDialog extends PreferenceDialog implements IWorkbenchPreferenceContainer { protected class PreferenceFilteredTree extends FilteredTree { private ViewerFilter viewerFilter ; private String cachedTitle ; PreferenceFilteredTree ( Composite parent , int treeStyle , PatternFilter filter ) { } protected void addFilter ( ViewerFilter filter ) { } protected void updateToolbar ( boolean visible ) { } protected void clearText ( ) { } } protected FilteredPreferenceDialog . PreferenceFilteredTree filteredTree ; private Object pageData ; IWorkingCopyManager workingCopyManager ; private Collection updateJobs = new ArrayList ( ) ; PreferencePageHistory history ; private Sash sash ; private IHandlerActivation showViewHandler ; private boolean locked ; public FilteredPreferenceDialog ( Shell parentShell , PreferenceManager manager ) { } protected IPreferenceNode findNodeMatching ( String nodeId ) { } protected TreeViewer createTreeViewer ( Composite parent ) { } private boolean hasAtMostOnePage ( ) { } protected void setContentAndLabelProviders ( TreeViewer treeViewer ) { } protected String getContributionType ( ) { } protected void handleTreeSelectionChanged ( SelectionChangedEvent event ) { } protected Control createTreeAreaContents ( Composite parent ) { } public void showOnly ( String [ ] filteredIds ) { } public void setPageData ( Object pageData ) { } protected void createPage ( IPreferenceNode node ) { } public IPreferencePage getCurrentPage ( ) { } public boolean openPage ( String pageId , Object data ) { } public final void setCurrentPageId ( final String preferencePageId ) { } public IWorkingCopyManager getWorkingCopyManager ( ) { } protected void okPressed ( ) { } public void registerUpdateJob ( Job job ) { } Control getContainerToolBar ( Composite composite ) { final ToolBarManager historyManager = new ToolBarManager ( ( ( SWT . HORIZONTAL ) | ( SWT . FLAT ) ) ) ; historyManager . createControl ( composite ) ; history . createHistoryControls ( historyManager . getControl ( ) , historyManager ) ; Action popupMenuAction = new Action ( ) { public ImageDescriptor getImageDescriptor ( ) { return WorkbenchImages . getImageDescriptor ( IMG_LCL_VIEW_MENU ) ; } public void run ( ) { MenuManager manager = new MenuManager ( ) ; manager . add ( new Action ( ) { public void run ( ) { sash . addFocusListener ( new FocusAdapter ( ) { public void focusGained ( FocusEvent e ) { sash . setBackground ( sash . getDisplay ( ) . getSystemColor ( COLOR_LIST_SELECTION ) ) ; } public void focusLost ( FocusEvent e ) { sash . setBackground ( sash . getDisplay ( ) . getSystemColor ( COLOR_LIST_BACKGROUND ) ) ; } } ) ; sash . setFocus ( ) ; } public String getText ( ) { return WorkbenchMessages . FilteredPreferenceDialog_Resize ; } } ) ; Menu menu = manager . createContextMenu ( getShell ( ) ) ; Rectangle bounds = historyManager . getControl ( ) . getBounds ( ) ; Point topLeft = new Point ( ( ( bounds . x ) + ( bounds . width ) ) , ( ( bounds . y ) + ( bounds . height ) ) ) ; topLeft = historyManager . getControl ( ) . toDisplay ( topLeft ) ; menu . setLocation ( topLeft . x , topLeft . y ) ; menu . setVisible ( true ) ; } } ; historyManager . add ( popupMenuAction ) ; IHandlerService service = ( ( IHandlerService ) ( PlatformUI . getWorkbench ( ) . getService ( IHandlerService . class ) ) ) ; <START_BUG> showViewHandler = service . activateHandler ( WINDOW_SHOWVIEWMENU , new org . eclipse . jface . commands . ActionHandler ( popupMenuAction ) , new org . eclipse . ui . ActiveShellExpression ( getShell ( ) ) ) ; <END_BUG> historyManager . update ( false ) ; return historyManager . getControl ( ) ; } protected boolean showPage ( IPreferenceNode node ) { } public boolean close ( ) { } protected Composite createTitleArea ( Composite parent ) { } protected void selectSavedItem ( ) { } protected void updateTreeFont ( Font dialogFont ) { } private void applyDialogFont ( Control control , Font dialogFont ) { } protected Sash createSash ( Composite composite , Control rightControl ) { } public void setLocked ( boolean b ) { } }

Fix:
showViewHandler = service . activateHandler ( WINDOW_SHOW_VIEW_MENU , new org . eclipse . jface . commands . ActionHandler ( popupMenuAction ) , new org . eclipse . ui . ActiveShellExpression ( getShell ( ) ) ) ;