@Override public void queryRemoved(ISearchQuery query) { InternalSearchUI.getInstance().cancelSearch(query); if (query.getSearchResult().equals(fCurrentSearch)) { showSearchResult(null); partActivated(fDefaultPart); } fSearchViewStates.remove(query.getSearchResult()); fSearchesDropDownAction.disposeMenu(); fSearchesDropDownAction.updateEnablement(); }
private void createActions() { fSearchesDropDownAction = new SearchHistoryDropDownAction(this); fSearchesDropDownAction.updateEnablement(); fSearchAgainAction = new SearchAgainAction(this); fSearchAgainAction.setEnabled(false); fSearchAgainAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH); fCancelAction = new CancelSearchAction(this); fCancelAction.setEnabled(false); IUndoContext workspaceContext = (IUndoContext) ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); fUndoRedoActionGroup = new UndoRedoActionGroup(getViewSite(), workspaceContext, true); }
@Override public void queryAdded(ISearchQuery query) { fSearchesDropDownAction.updateEnablement(); }