/** * Save the global actions from action bar so they are not overridden by the * detail pane. */ @Override protected void createContextMenu(Control menuControl) { super.createContextMenu(menuControl); IActionBars actionBars = getViewSite().getActionBars(); if (!fGlobalActionMap.containsKey(SELECT_ALL_ACTION)) { setGlobalAction(IDebugView.SELECT_ALL_ACTION, actionBars.getGlobalActionHandler(SELECT_ALL_ACTION)); } if (!fGlobalActionMap.containsKey(COPY_ACTION)) { setGlobalAction(COPY_ACTION, actionBars.getGlobalActionHandler(COPY_ACTION)); } if (!fGlobalActionMap.containsKey(PASTE_ACTION)) { setGlobalAction(PASTE_ACTION, actionBars.getGlobalActionHandler(PASTE_ACTION)); } }
Viewer viewer = getViewer(); if (viewer != null) { createContextMenu(viewer.getControl());