/** * Fills the context menu for this page. Subclasses may override this * method. * * @param mgr the menu manager representing the context menu */ protected void fillContextMenu(IMenuManager mgr) { mgr.appendToGroup(IContextMenuConstants.GROUP_SHOW, fShowNextAction); mgr.appendToGroup(IContextMenuConstants.GROUP_SHOW, fShowPreviousAction); mgr.appendToGroup(IContextMenuConstants.GROUP_EDIT, fCopyToClipboardAction); if (getCurrentMatch() != null) mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveCurrentMatch); if (canRemoveMatchesWith(getViewer().getSelection())) mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveSelectedMatches); mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveAllResultsAction); }
/** * Fills the context menu for this page. Subclasses may override this * method. * * @param mgr the menu manager representing the context menu */ protected void fillContextMenu(IMenuManager mgr) { mgr.appendToGroup(IContextMenuConstants.GROUP_SHOW, fShowNextAction); mgr.appendToGroup(IContextMenuConstants.GROUP_SHOW, fShowPreviousAction); mgr.appendToGroup(IContextMenuConstants.GROUP_EDIT, fCopyToClipboardAction); if (getCurrentMatch() != null) mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveCurrentMatch); if (canRemoveMatchesWith(getViewer().getSelection())) mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveSelectedMatches); mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveAllResultsAction); }
fRemoveSelectedMatches.setEnabled(canRemoveMatchesWith(event.getSelection())); });