Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.Prop


        out.println("history.back();");
        out.println("</SCRIPT></HEAD><BODY></BODY></HTML>");
    }

    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


        }
    }

    private static void getDataAndDefectFilesInUse(Set<String> filesInUse,
            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

            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

     * @param node
     *            one node to examine
     * @return true if this node should be pruned from the tree, false otherwise
     */
    private boolean pruneForDisplay(DashHierarchy hier, PropertyKey node) {
        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);
        }

        return isProject == false && p.getNumChildren() == 0;
    }
View Full Code Here

        getOrCreateProp(hier, parent).addChild(child, 0);
        return child;
    }

    private Prop getOrCreateProp(DashHierarchy hier, PropertyKey key) {
        Prop prop = hier.pget(key);
        hier.put(key, prop);
        return prop;
    }
View Full Code Here

            DashHierarchy hier = ctx.getHierarchy();
            PropertyKey selectedNode = getSelectedTreeNode();
            if (!StringUtils.hasValue(hier.getID(selectedNode)))
                return;

            Prop parent = hier.pget(selectedNode.getParent());
            int pos = parent.getChildPos(selectedNode) + nodeOffset;
            if (pos > 0 && pos < parent.getNumChildren()) {
                nodeParent = parent;
                childPosToMoveUp = pos;
            }
        }
View Full Code Here

        }
    }

    private void openDataFiles(String property_directory, PropertyKey key)
            throws FileNotFoundException, IOException, InvalidDatafileFormat {
        Prop val = hierarchy.pget(key);
        String id = val.getID();
        String dataFile = val.getDataFile();

        if (shouldLoadDataFile(id, dataFile)) {
            // System.out.println("opening datafile for " + key.path());
            data.openDatafile(key.path(), property_directory + dataFile);
        }
View Full Code Here

        // Look through the hierarchy for existing team/personal projects
        boolean containsTeamProject = false;
        boolean containsPersonalProject = false;

        for (Iterator i = props.values().iterator(); i.hasNext();) {
            Prop p = (Prop) i.next();
            String templateId = (p == null ? null : p.getID());
            if (templateId == null)
                ;

            else if (templateId.endsWith("/TeamRoot")
                    || templateId.endsWith("/MasterRoot"))
View Full Code Here

  }


  protected void reload () {
    PropertyKey pKey;
    Prop prop;
    DefectLog dl;
    String defLogName;
    Defect[] defects;
    defectLogs.clear();
    Enumeration pKeys = useProps.keys ();
    while (pKeys.hasMoreElements()) {
      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();
View Full Code Here

    tree.scrollPathToVisible(tp);
    tree.addSelectionPath(tp);
  }
  private boolean hasDefLog(PropertyKey phase) {
    if (phase == null) return false;
    Prop prop = useProps.pget(phase);
    String defLogName = prop.getDefectLog ();
    return (defLogName != null && defLogName.length() > 0);
  }
View Full Code Here

TOP

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

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.