protected void doDestroyPage(IWorkbenchPart part, PageRec rec) { IPropertySheetPage page = (IPropertySheetPage) rec.page; page.dispose(); rec.dispose(); }
public void selectionChanged(IWorkbenchPart part, ISelection sel) { // we ignore our own selection or null selection if (part == this || sel == null) { return; } // pass the selection to the page IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(part, sel); } }
protected PageRec doCreatePage(IWorkbenchPart part) { // Try to get a custom property sheet page. IPropertySheetPage page = (IPropertySheetPage) ViewsPlugin.getAdapter(part, IPropertySheetPage.class, false); if (page != null) { if (page instanceof IPageBookViewPage) { initPage((IPageBookViewPage) page); } page.createControl(getPageBook()); return new PageRec(part, page); } // Use the default page return null; }
@Override protected PageRec doCreatePage(IWorkbenchPart part) { // Get a custom property sheet page but not if the part is also a // PropertySheet. In this case the child property sheet would // accidentally reuse the parent's property sheet page. if(part instanceof PropertySheet) { return null; } IPropertySheetPage page = Adapters.adapt(part, IPropertySheetPage.class); if (page != null) { if (page instanceof IPageBookViewPage) { initPage((IPageBookViewPage) page); } page.createControl(getPageBook()); return new PageRec(part, page); } // Use the default page return null; }
private void showSelectionAndDescription() { selectionUpdatePending = false; if (currentPart == null || currentSelection == null) { return; } IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(currentPart, currentSelection); } updateContentDescription(); }
@Override protected void doDestroyPage(IWorkbenchPart part, PageRec rec) { IPropertySheetPage page = (IPropertySheetPage) rec.page; page.dispose(); rec.dispose(); }
@Override protected PageRec doCreatePage(IWorkbenchPart part) { // Get a custom property sheet page but not if the part is also a // PropertySheet. In this case the child property sheet would // accidentally reuse the parent's property sheet page. if(part instanceof PropertySheet) { return null; } IPropertySheetPage page = Adapters.adapt(part, IPropertySheetPage.class); if (page != null) { if (page instanceof IPageBookViewPage) { initPage((IPageBookViewPage) page); } page.createControl(getPageBook()); return new PageRec(part, page); } // Use the default page return null; }
@Override public void selectionChanged(IWorkbenchPart part, ISelection sel) { // we ignore selection if we are hidden OR selection is coming from // another source as the last one if (part == null || !part.equals(currentPart)) { return; } // we ignore null selection, or if we are pinned, or our own selection // or same selection if (sel == null || !isImportant(part) || sel.equals(currentSelection)) { return; } currentPart = part; currentSelection = sel; boolean visible = getSite() != null && getSite().getPage().isPartVisible(this); if (!visible) { return; } // pass the selection to the page IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(currentPart, currentSelection); } updateContentDescription(); }
@Override protected void doDestroyPage(IWorkbenchPart part, PageRec rec) { IPropertySheetPage page = (IPropertySheetPage) rec.page; page.dispose(); rec.dispose(); }
/** * The <code>PropertySheet</code> implementation of this <code>IPartListener</code> * method first sees if the active part is an <code>IContributedContentsView</code> * adapter and if so, asks it for its contributing part. */ public void partActivated(IWorkbenchPart part) { // Look for a declaratively-contributed adapter - including not yet loaded adapter factories. // See bug 86362 [PropertiesView] Can not access AdapterFactory, when plugin is not loaded. IContributedContentsView view = (IContributedContentsView) ViewsPlugin.getAdapter(part, IContributedContentsView.class, true); IWorkbenchPart source = null; if (view != null) { source = view.getContributingPart(); } if (source != null) { super.partActivated(source); } else { super.partActivated(part); } // When the view is first opened, pass the selection to the page if (bootstrapSelection != null) { IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(part, bootstrapSelection); } bootstrapSelection = null; } }
IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(currentPart, currentSelection); IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(part, bootstrapSelection);
IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(part, bootstrapSelection);