@Override protected void showPageRec(PageRec pageRec) { super.showPageRec(pageRec); addNavigationHistoryEntry(); }
protected void showPageRec(PageRec pageRec) { super.showPageRec(pageRec); activeParticipantRef = (ISynchronizeParticipant)fPartToParticipant.get(pageRec.part); updateActionEnablements(); updateTitle(); }
@Override protected void showPageRec(PageRec pageRec) { super.showPageRec(pageRec); activeParticipantRef = fPartToParticipant.get(pageRec.part); updateActionEnablements(); updateTitle(); }
/** * The <code>PageBookView</code> implementation of this * <code>IPartListener</code> method deal with the closing of the active * part. Subclasses may extend. */ @Override public void partClosed(IWorkbenchPart part) { // Update the active part. if (activeRec != null && activeRec.part == part) { showPageRec(defaultPageRec); } // Find and remove the part page. PageRec rec = getPageRec(part); if (rec != null) { removePage(rec, true); } if (part == hiddenPart) { hiddenPart = null; } }
/** * The <code>ContentOutline</code> implementation of this <code>PageBookView</code> method * extends the behavior of its parent to use the current page as a selection provider. * * @param pageRec the page record containing the page to show */ protected void showPageRec(PageRec pageRec) { IPageSite pageSite = getPageSite(pageRec.page); ISelectionProvider provider = pageSite.getSelectionProvider(); if (provider == null && (pageRec.page instanceof IContentOutlinePage)) { // This means that the page did not set a provider during its initialization // so for backward compatibility we will set the page itself as the provider. pageSite.setSelectionProvider((IContentOutlinePage) pageRec.page); } super.showPageRec(pageRec); } }
super.showPageRec(pageRec); fActiveConsole = recConsole; IConsole tos = null;
super.showPageRec(pageRec); fActiveConsole = recConsole; IConsole tos = null;
/** * The <code>ContentOutline</code> implementation of this <code>PageBookView</code> method * extends the behavior of its parent to use the current page as a selection provider. * * @param pageRec the page record containing the page to show */ @Override protected void showPageRec(PageRec pageRec) { IPageSite pageSite = getPageSite(pageRec.page); ISelectionProvider provider = pageSite.getSelectionProvider(); if (provider == null && (pageRec.page instanceof IContentOutlinePage)) { // This means that the page did not set a provider during its initialization // so for backward compatibility we will set the page itself as the provider. pageSite.setSelectionProvider((IContentOutlinePage) pageRec.page); } super.showPageRec(pageRec); } }
/** * The <code>ContentOutline</code> implementation of this <code>PageBookView</code> method * extends the behavior of its parent to use the current page as a selection provider. * * @param pageRec the page record containing the page to show */ @Override protected void showPageRec(PageRec pageRec) { IPageSite pageSite = getPageSite(pageRec.page); ISelectionProvider provider = pageSite.getSelectionProvider(); if (provider == null && (pageRec.page instanceof IContentOutlinePage)) { // This means that the page did not set a provider during its initialization // so for backward compatibility we will set the page itself as the provider. pageSite.setSelectionProvider((IContentOutlinePage) pageRec.page); } super.showPageRec(pageRec); } }
@Override protected void showPageRec(PageRec pageRec) { IPage currPage = getCurrentPage(); // if we try to show the same page, just call super and return, no use calling any custom functions if (pageRec.page.equals(currPage)) { super.showPageRec(pageRec); return; } IStructuredSelection selection = null; if (currPage instanceof DependenciesViewPage) { selection = ((DependenciesViewPage) currPage).getSelection(); ((DependenciesViewPage) currPage).setActive(false); } IPage p = pageRec.page; if (p instanceof DependenciesViewPage) { ((DependenciesViewPage) p).setInput(fInput); // configure view before actually showing it ((DependenciesViewPage) p).setActive(true); } super.showPageRec(pageRec); if (p instanceof DependenciesViewPage) { updateTitle(fInput); ((DependenciesViewPage) p).setSelection(selection); } }
showPageRec(rec); } else { showPageRec(defaultPageRec);
/** * The <code>PageBookView</code> implementation of this * <code>IWorkbenchPart</code> method creates a <code>PageBook</code> * control with its default page showing. Subclasses may extend. */ @Override public void createPartControl(Composite parent) { // Create the page book. book = new PageBook(parent, SWT.NONE); // Create the default page rec. IPage defaultPage = createDefaultPage(book); defaultPageRec = new PageRec(null, defaultPage); preparePage(defaultPageRec); // Show the default page showPageRec(defaultPageRec); // Listen to part activation events. getSite().getPage().addPartListener(partListener); showBootstrapPart(); }
/** * Make sure that the part is not considered if it is hidden. * @param part * @since 3.5 */ protected void partHidden(IWorkbenchPart part) { if (part == null || part != getCurrentContributingPart()) { return; } // if we've minimized the editor stack, that's no reason to // drop our content IWorkbenchPage page = getSite().getPage(); if (page.getPartState(page.getReference(part)) == IWorkbenchPage.STATE_MINIMIZED) { return; } // if we're switching from a part source in our own stack, // we also don't want to clear our content. if (part instanceof IViewPart) { final IViewPart[] viewStack = page.getViewStack(this); if (containsPart(viewStack, part)) { return; } } hiddenPart = part; showPageRec(defaultPageRec); }