Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.PreferenceNode


    }

    public void widgetSelected(SelectionEvent e) {
      if (e.getSource() == openPreferences) {
        PreferenceManager manager = new PreferenceManager();
        manager.addToRoot(new PreferenceNode("Hadoop Installation Directory",
            new HadoopHomeDirPreferencePage()));
        PreferenceDialog dialog = new PreferenceDialog(this.getShell(), manager);
        dialog.create();
        dialog.setMessage("Select Hadoop Installation Directory");
        dialog.setBlockOnOpen(true);
View Full Code Here


        ISelection sel = new StructuredSelection(new AnnotationTypeNode(editor, null));
        PropertyPage page = new EditorAnnotationPropertyPage();
        page.setElement(new AnnotationTypeNode(editor, null));
        page.setTitle("Styles");
        PreferenceManager mgr = new PreferenceManager();
        IPreferenceNode node = new PreferenceNode("1", page);
        mgr.addToRoot(node);
        PropertyDialog dialog = new PropertyDialog(getSite().getShell(), mgr, sel);
        dialog.create();
        dialog.setMessage(page.getTitle());
        dialog.open();
View Full Code Here

   
    private void addGlobalPreferences(PreferenceManager prefManager) {
      PrefPage[] globalPrefPages = prefAdmin.getGlobalPrefPages();
     
      BlankPreferencePage globalPrefPageRoot = new BlankPreferencePage(1, "General Preferences", "Contains preferences that change the workbench's functionality.");
      PreferenceNode rootNode = new PreferenceNode("General Preferences Root", globalPrefPageRoot);
      prefManager.addToRoot(rootNode);
     
      addPrefPages(globalPrefPages, rootNode);
    }
View Full Code Here

    private void addLocalPreferences(PreferenceManager prefManager) {
      PrefPage[] localPrefPages = prefAdmin.getLocalPrefPages();
     
      BlankPreferencePage localPrefPageRoot = new BlankPreferencePage(1,
          "Algorithm Preferences", "Contains preferences that modify how particular algorithms work.");
      PreferenceNode rootNode = new PreferenceNode("Algorithm Preferences Root", localPrefPageRoot);
      prefManager.addToRoot(rootNode);
     
      addPrefPages(localPrefPages, rootNode);
    }
View Full Code Here

    private void addParamPreferences(PreferenceManager prefManager) {
      PrefPage[] paramPrefPages = prefAdmin.getParamPrefPages();
     
      BlankPreferencePage paramPrefPageRoot = new BlankPreferencePage(1, "Algorithm Parameter Preferences",
          "Contains preferences that specify the default values for algorithm menus");
      PreferenceNode rootNode = new PreferenceNode("General Preferences Root", paramPrefPageRoot);
      prefManager.addToRoot(rootNode);
     
      addPrefPages(paramPrefPages, rootNode);
    }
View Full Code Here

    }
   
    private void addPrefPages(PrefPage[] prefPages, PreferenceNode rootNode) {
      Arrays.sort(prefPages, new PrefPageComparator());
      for (int ii = 0; ii < prefPages.length; ii++) {
        PreferenceNode prefNode = makePreferenceNode(prefPages[ii]);
        rootNode.add(prefNode);
      }
    }
View Full Code Here

    Configuration prefConf = prefPage.getPrefConf();
   
    CIShellPreferenceStore prefStore = new CIShellPreferenceStore(this.log, prefOCD, prefConf);
    CIShellPreferencePage guiPrefPage = new CIShellPreferencePage(this.log,
        prefOCD, prefStore);
    return new PreferenceNode(prefConf.getPid(), guiPrefPage);
    }
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {
    PreferenceManager pm = new PreferenceManager();

    PreferencePage page = new ConfigPreferencePage();
    page.setTitle("TextRuler");
    PreferenceNode node = new PreferenceNode("org.apache.uima.ruta.textruler.config", page);
    pm.addToRoot(node);

    List<PreferenceNode> nodes = pm.getElements(0);
    PreferenceNode top = null;
    for (PreferenceNode n : nodes)
      if (n.getId().equals("org.apache.uima.ruta.textruler.config"))
        top = n;
    if (top != null) {
      for (TextRulerLearnerController ctrl : TextRulerController.getAvailableControllers()) {
        TextRulerLearnerParameter[] params = ctrl.getFactory().getAlgorithmParameters();
        if (params == null || params.length == 0)
          continue;
        page = new AlgorithmPreferencePage(ctrl);
        page.setTitle(ctrl.getName());
        node = new PreferenceNode(ctrl.getID(), page);
        top.add(node);
      }
    }

    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    PreferenceDialog pd = new PreferenceDialog(shell, pm);
View Full Code Here

    }

    public void widgetSelected(SelectionEvent e) {
      if (e.getSource() == openPreferences) {
        PreferenceManager manager = new PreferenceManager();
        manager.addToRoot(new PreferenceNode("Hadoop Installation Directory", new MapReducePreferencePage()));
        PreferenceDialog dialog = new PreferenceDialog(this.getShell(), manager);
        dialog.create();
        dialog.setMessage("Select Hadoop Installation Directory");
        dialog.setBlockOnOpen(true);
        dialog.open();
View Full Code Here

        // createPreferenceDialogOn.open();

        IWorkbenchPropertyPage page = new WebDirectoryLocation();
        page.setElement(project);
        PreferenceManager mgr = new PreferenceManager();
        IPreferenceNode node = new PreferenceNode("1", page);

        mgr.addToRoot(node);
        PreferenceDialog dialog = new PreferenceDialog(Display
            .getDefault().getActiveShell(), mgr);
        dialog.create();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.preference.PreferenceNode

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.