예제 #1
0
  /* (non-Javadoc)
   * Method declared on ISelectionListener.
   * Notify the current page that the selection has changed.
   */
  public void selectionChanged(IWorkbenchPart part, ISelection sel) {
    // 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;
    }

    // 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;
    }

    currentPart = part;
    currentSelection = sel;

    // pass the selection to the page
    IPropertySheetPage page = (IPropertySheetPage) getCurrentPage();
    if (page != null) {
      page.selectionChanged(currentPart, currentSelection);
    }

    updateContentDescription();
  }
예제 #2
0
 /**
  * *
  *
  * @param pinned Whether this sheet should be pinned
  * @since 3.4
  */
 public void setPinned(boolean pinned) {
   pinPropertySheetAction.setChecked(pinned);
   updateContentDescription();
 }