@Override
 protected boolean showPage(IPreferenceNode node) {
   final boolean success = super.showPage(node);
   if (success) {
     history.addHistoryEntry(new PreferenceHistoryEntry(node.getId(), node.getLabelText(), null));
   }
   return success;
 }
 public void execute() {
   IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
   if (window != null) {
     WorkbenchPreferenceDialog dialog =
         WorkbenchPreferenceDialog.createDialogOn(window.getShell(), preferenceNode.getId());
     dialog.open();
   }
 }
  /**
   * Check to see if the node or any of its children have an id in the ids.
   *
   * @param node WorkbenchPreferenceNode
   * @return boolean <code>true</code> if node or oe of its children has an id in the ids.
   */
  private boolean checkNodeAndChildren(IPreferenceNode node) {
    if (ids.contains(node.getId())) {
      return true;
    }

    IPreferenceNode[] subNodes = node.getSubNodes();
    for (int i = 0; i < subNodes.length; i++) {
      if (checkNodeAndChildren(subNodes[i])) {
        return true;
      }
    }
    return false;
  }
  /**
   * Create Network group
   *
   * @param parent parent composite
   */
  @SuppressWarnings("unchecked")
  private void createNetworkGroup(Composite parent) {

    // Makes the network preferences dialog manager
    PreferenceManager manager = PlatformUI.getWorkbench().getPreferenceManager();

    IPreferenceNode networkNode = null;

    for (IPreferenceNode node :
        (List<IPreferenceNode>) manager.getElements(PreferenceManager.PRE_ORDER)) {
      if (node.getId().equals(PROXY_PREFERENCE_PAGE_ID)) {
        networkNode = node;
        break;
      }
    }
    prefMan = new PreferenceManager();
    if (networkNode != null) {
      prefMan.addToRoot(networkNode);
    }

    Link downloadText = new Link(parent, SWT.WRAP);
    downloadText.addSelectionListener(
        new SelectionListener() {
          public void widgetDefaultSelected(SelectionEvent e) {
            // Do nothing
          }

          public void widgetSelected(SelectionEvent e) {
            openNetworkPreferencesPage();
          }
        });

    String linkText =
        Messages.bind(Messages.NetworkLinkText, Messages.NetworkLinkText, Messages.NetworkLinkLink);

    downloadText.setText(linkText);
    downloadText.update();
    GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    downloadText.setLayoutData(gridData);
  }
 public String getId() {
   return preferenceNode.getId();
 }