Package org.eclipse.ui.internal.dialogs

Examples of org.eclipse.ui.internal.dialogs.PropertyPageManager


    public static void openPropertyDialog(Shell shell, IProject project) {

        // find out if the override page is contributed, and show that instead of the default one
        // TODO - stop relying on internals

        PropertyPageManager pageManager = new PropertyPageManager();
        PropertyPageContributorManager.getManager().contribute(pageManager, project);

        List<?> nodes = pageManager.getElements(PreferenceManager.PRE_ORDER);
        boolean overridePresent = false;
        for (Object node : nodes) {
            if (((IPreferenceNode) node).getId().equals(PAGE_ID_OVERRIDE)) {
                overridePresent = true;
                break;
View Full Code Here


    if (idToElement == null) {
      idToElement = new HashMap();
      IWorkbenchPage activePage = PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage();
      if (activePage != null) {
        PropertyPageManager pageManager = new PropertyPageManager();
        ISelection selection = activePage.getSelection();
        if (selection instanceof IStructuredSelection
            && !selection.isEmpty()) {
          Object element = ((IStructuredSelection) selection)
              .getFirstElement();
          PropertyPageContributorManager.getManager().contribute(
              pageManager, element);
          List list = pageManager
              .getElements(PreferenceManager.PRE_ORDER);
          IPreferenceNode[] properties = (IPreferenceNode[]) list
              .toArray(new IPreferenceNode[list.size()]);
          for (int i = 0; i < properties.length; i++) {
            PropertiesElement propertiesElement = new PropertiesElement(
View Full Code Here

   * was selected.
   */
  public static boolean showPreferenceDialog(String propertyPageId, IProject project, Map<String, Object> data) {
    IPreferenceNode targetNode = null;

    PropertyPageManager pageManager = new PropertyPageManager();
    PropertyPageContributorManager.getManager().contribute(pageManager, project);

    IPreferenceNode[] nodes = pageManager.getRootSubNodes();
    for (IPreferenceNode node : nodes) {
      if (SpringPreferencePage.ID.equals(node.getId())) {
        targetNode = node;
        break;
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.dialogs.PropertyPageManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.