@Override public void dispose() { if (fUndoRedoActionGroup != null) { fUndoRedoActionGroup.dispose(); } InternalSearchUI.getInstance().getSearchViewManager().searchViewClosed(this); InternalSearchUI.getInstance().getSearchManager().removeQueryListener(this); super.dispose(); }
@Override protected void initPage(IPageBookViewPage page) { super.initPage(page); IActionBars actionBars = page.getSite().getActionBars(); actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), fSearchAgainAction); actionBars.updateActionBars(); fUndoRedoActionGroup.fillActionBars(actionBars); ISearchResultPage srPage = (ISearchResultPage) page; IMemento memento = null; if (fPageState != null) { IMemento[] mementos = fPageState.getChildren(MEMENTO_TYPE); for (int i = 0; i < mementos.length; i++) { if (mementos[i].getID().equals(srPage.getID())) { memento = mementos[i]; break; } } } srPage.restoreState(memento); }