예제 #1
0
 @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();
 }
예제 #2
0
  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);
  }
예제 #3
0
 @Override
 public void queryAdded(ISearchQuery query) {
   fSearchesDropDownAction.updateEnablement();
 }