Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.PropertyKey


      foundErr = true;
    }

    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (!checkTimeData(cKey.path(), expectedTimes[a][b][c]))
            foundErr = true;
        }
      }
    }
    if (foundErr)
View Full Code Here


    return gvitm;
  }

  private String getPathStr(int[] newPath) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    PropertyKey key = PropertyKey.ROOT;
    for (int i = 0; i < newPath.length; i++)
      key = hier.getChildKey(key, newPath[i]);
    return key.path();
  }
View Full Code Here

  }

  private int[] getPathFor(String path) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (path.equals(cKey.path()))
            return new int[] { a, b, c };
        }
      }
    }
    new Exception("no node found for path " + path).printStackTrace();
View Full Code Here

    public static void showTimeLogEditor(final String path) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() { showTimeLogEditorImpl(path); }});
    }
    private static void showTimeLogEditorImpl(String path) {
        PropertyKey key = dash.props.findExistingKey(path);
        dash.configure_button.startTimeLog(key);
    }
View Full Code Here

    public static Map getTemplates() {
        Prop templates = dash.templates.pget(PropertyKey.ROOT);
        TreeMap result = new TreeMap();
        for (int i = templates.getNumChildren();   i-- > 0; ) {
            PropertyKey childKey = templates.getChild(i);
            Prop child = dash.templates.pget(childKey);
            result.put(child.getID(), Prop.unqualifiedName(childKey.name()));
        }
        return result;
    }
View Full Code Here

                                          String oldID,
                                          String newID) {
        if (Settings.isReadOnly())
            return false;
       
        PropertyKey key = dash.props.findExistingKey(prefix);
        String actualID = dash.props.getID(key);
        if (oldID == actualID || // handles "null == null" case
            (oldID != null && oldID.equals(actualID))) try {
            HierarchyAlterer a = new HierarchyAlterer(dash);
            a.addTemplate(prefix, newID);
View Full Code Here

            PropertyKey node) {
        Prop p = dash.getHierarchy().pget(node);
        filesInUse.add(lower(p.getDataFile()));
        filesInUse.add(lower(p.getDefectLog()));
        for (int i = dash.getHierarchy().getNumChildren(node);  i-- > 0; ) {
            PropertyKey child = dash.getHierarchy().getChildKey(node, i);
            getDataAndDefectFilesInUse(filesInUse, child);
        }
    }
View Full Code Here

            // about the phases in various metrics collection frameworks.
            return;

        for (Iterator i = TEMPLATES.entrySet().iterator(); i.hasNext();) {
            Map.Entry e = (Map.Entry) i.next();
            PropertyKey key = (PropertyKey) e.getKey();
            Prop prop = (Prop) e.getValue();
            if (PROCESS_PHASE_STATUS.equals(prop.getStatus())) {
                String phaseName = Prop.unqualifiedName(key.name());
                m.addSafeName(phaseName);
            }
        }
    }
View Full Code Here

        Prop p = hier.pget(node);
        String templateId = p.getID();
        boolean isProject = StringUtils.hasValue(templateId);

        for (int i = p.getNumChildren(); i-- > 0;) {
            PropertyKey child = p.getChild(i);
            boolean shouldPrune = isProject || pruneForDisplay(hier, child);
            if (shouldPrune)
                p.removeChild(i);
        }
View Full Code Here

        return isProject == false && p.getNumChildren() == 0;
    }

    private void maybeCreateDefaultHierarchy(DashHierarchy hier) {
        if (hier.getNumChildren(PropertyKey.ROOT) == 0) {
            PropertyKey projectNode = addHierChild(hier, PropertyKey.ROOT,
                resources.getString("Project"));
            PropertyKey noneFound = addHierChild(hier, projectNode,
                resources.getString("None_Found"));
            getOrCreateProp(hier, noneFound).setID("Nonexistent Project");
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.hier.PropertyKey

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.