private void internalShowSearchPage(ISearchResultPage page, ISearchResult search) { // detach the previous page. ISearchResultPage currentPage = (ISearchResultPage) getCurrentPage(); if (fCurrentSearch != null && currentPage != null) { fSearchViewStates.put(fCurrentSearch, currentPage.getUIState()); currentPage.setInput(null, null); } fCurrentSearch = search; if (page != null) { if (page != currentPage) { DummyPart part = fPagesToParts.get(page); if (part == null) { part = new DummyPart(); fPagesToParts.put(page, part); fPartsToPages.put(part, page); page.setViewPart(this); } part.setLastActivation(++fActivationCount); partActivated(part); } // connect to the new pages Object uiState = search != null ? fSearchViewStates.get(search) : null; page.setInput(search, uiState); } updatePartName(); updateLabel(); updateCancelAction(); updateHelpContextID(page); }