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); } }
private void showSelectionAndDescription() { selectionUpdatePending = false; if (currentPart == null || currentSelection == null) { return; } IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(currentPart, currentSelection); } updateContentDescription(); }
@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(); }
&& ((PropertySheet) part).getCurrentPage() == this;
/** * 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; } }
&& ((PropertySheet) part).getCurrentPage() == this;
if (sheet.getCurrentPage() instanceof TabbedPropertySheetPage) TabbedPropertySheetPage tabbedPage = (TabbedPropertySheetPage)sheet.getCurrentPage(); if (tabbedPage.getControl() instanceof Composite)
public void partActivated(IWorkbenchPart p) { if (p instanceof ContentOutline) { if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { getActionBarContributor().setActiveEditor(GenModelEditor.this); setCurrentViewer(contentOutlineViewer); } } else if (p instanceof PropertySheet) { if (((PropertySheet)p).getCurrentPage() == propertySheetPage) { getActionBarContributor().setActiveEditor(GenModelEditor.this); handleActivate(); } } else if (p == GenModelEditor.this) { handleActivate(); } } public void partBroughtToTop(IWorkbenchPart p)
super.partActivated(part); if (currentPart != null) { IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(currentPart, currentSelection); IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(part, bootstrapSelection);
if (sheet.getCurrentPage() instanceof TabbedPropertySheetPage) TabbedPropertySheetPage tabbedPage = (TabbedPropertySheetPage)sheet.getCurrentPage(); Composite targetComposite = null; if (tabbedPage.getControl() instanceof Composite)
IPropertySheetPage page = (IPropertySheetPage) getCurrentPage(); if (page != null) { page.selectionChanged(part, bootstrapSelection);