Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.PropertyKey.path()


  String getSelectedPath() {
    DefaultMutableTreeNode selected = getSelectedNode();
    if (selected == null) return "";

    PropertyKey key = treeModel.getPropKey (useProps, selected.getPath());
    return (key == null ? "" : key.path());
  }


  boolean areEqual(String s1, String s2) {
    return ((s1 == s2) ||       // handle null / identical strings first
View Full Code Here


      pKey = (PropertyKey)pKeys.nextElement();
      prop = useProps.pget (pKey);
      defLogName = prop.getDefectLog ();
      if (defLogName != null && defLogName.length() != 0) {
        dl = new DefectLog (dashboard.getDirectory() + defLogName,
                            pKey.path(),
                            data);
        defects = dl.readDefects();
        defectLogs.put (pKey, new DefectListID (pKey, dl, defects));
      }
    }
View Full Code Here

    DefaultMutableTreeNode selected = getSelectedNode();
    String extraPathFilter = null;
    if (selected != null) {
      key = selectedKey = treeModel.getPropKey (useProps, selected.getPath());
      if (key != null) {
        String selectedPath = key.path();
        DefectLogID logid = useProps.defectLog(key, "unimportant");
        if (logid != null) {
          defectLogKey = logid.path;
          if (logid.path != key) {
            key = logid.path;
View Full Code Here

        DefectLogID logid = useProps.defectLog(key, "unimportant");
        if (logid != null) {
          defectLogKey = logid.path;
          if (logid.path != key) {
            key = logid.path;
            String defectLogPath = key.path();
            extraPathFilter = selectedPath.substring(defectLogPath.length()+1);
          } else {
            PropertyKey currPhase = dashboard.getCurrentPhase();
            if (currPhase != null && currPhase.getParent().equals(selectedKey))
                selectedKey = currPhase;
View Full Code Here

      PropertyKey currPhase = dashboard.getCurrentPhase();
      if (currPhase == null)
          return;

      if (currPhase.path().startsWith(selectedKey.path()+"/"))
          updateImportActions(currPhase, selectedKey);
  }
 
  private void updateImportActions(PropertyKey selectedKey,
          PropertyKey defectLogKey) {
View Full Code Here

    String clickPref = Settings.getVal(DROP_DOWN_BEHAVIOR_PREF);
    clickOpensDefault = "true".equals(clickPref);
    setMainButtonBehavior(clickOpensDefault ? RUN_FIRST_MENU_OPTION
            : OPEN_DROP_DOWN_MENU);
    PropertyKey currentPhase = parent.getActiveTaskModel().getNode();
    path = (currentPhase == null ? null : currentPhase.path());
    setPaths(ScriptEnumerator.getScripts(parent, currentPhase));
  }

  // setPaths populates the popup menu with valid script paths.
  // However, it does not command the menu to be displayed.
View Full Code Here

        // fetch and add time spent in this node
        Object[] treePath = treeModel.getPathToRoot((TreeNode) node);
        PropertyKey key = treeModel.getPropKey(useProps, treePath);
        if (key != null) {
            String pathPrefix = key.path();
            // For efficiency, we only search through the portion of the
            // SortedMap which could contain paths matching our prefix.
            // "Matching our prefix" means that it exactly equals our
            // prefix, or it begins with our prefix followed by a slash.
            // The character after the slash character is the zero '0'.
View Full Code Here

        // try to base new row on current tree selection
        if ((selected = getSelectedNode()) != null
                && (key = treeModel.getPropKey(useProps, selected.getPath())) != null
                && timeLoggingAllowed(key))
            pathBasedOn = key.path();

        // else try to base new row on current editing row
        else if ((rowBasedOn = table.getEditingRow()) != -1)
            saveEditInProgress();
View Full Code Here

    protected String getPathIfLoggingAllowed(TreePath path) {
        if (path == null)
            return null;
       
        PropertyKey key = treeModel.getPropKey(useProps, path.getPath());
        return (timeLoggingAllowed(key) ? key.path() : null);
    }

    /**
     * The next method implement the TreeSelectionListener interface to deal
     * with changes to the tree selection.
View Full Code Here

        int numKids = hier.getNumChildren(parent);
        List projectPaths = new ArrayList(numKids);
        ListData projectPathsData = new ListData();
        for (int i = 0;  i < numKids; i++) {
            PropertyKey child = hier.getChildKey(parent, i);
            projectPaths.add(child.path());
            projectPathsData.add(StringData.create(child.path()));
        }
        getDataRepository().putValue("///STUDATA_List", projectPathsData);
        return projectPaths;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.