Examples of Prop


Examples of net.sourceforge.processdash.hier.Prop

     * @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

Examples of net.sourceforge.processdash.hier.Prop

        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

Examples of net.sourceforge.processdash.hier.Prop

            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

Examples of net.sourceforge.processdash.hier.Prop

        }
    }

    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

Examples of net.sourceforge.processdash.hier.Prop

        // 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

Examples of net.sourceforge.processdash.hier.Prop

  }


  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

Examples of net.sourceforge.processdash.hier.Prop

    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

Examples of net.sourceforge.processdash.hier.Prop

                             ? resources.getString("Time_Card.Daily_Total")
                             : key.name());
                this.fullname = key.path();
                this.time = new double[32];
                this.children = new ArrayList();
                Prop prop = props.pget(key);
                for (int i = 0;   i < prop.getNumChildren();   i++)
                    children.add(new TimeCardNode(this, props,
                                                  prop.getChild(i)));
            }
View Full Code Here

Examples of net.sourceforge.processdash.hier.Prop

     * @param t An analysis task to perform.  Every defect encountered will
     *    be passed to the task, in turn.
     */
    public static void run(DashHierarchy props, PropertyKey pKey,
            boolean includeChildren, Task t) {
        Prop prop = props.pget (pKey);
        String path = pKey.path();
        String defLogName = prop.getDefectLog ();

        // If this node has a defect log,
        if (defLogName != null && defLogName.length() != 0) {
            DefectLog dl = new DefectLog
                (dataDirectory + defLogName, path, null);
            // read all the defects in that log, and
            Defect[] defects = dl.readDefects();
            for (int d=0;  d < defects.length;  d++)
                if (defects[d] != null)   // pass them to the analyzer task.
                    t.analyze(path, defects[d]);
        }

        // recursively analyze all the children of this node.
        if (includeChildren)
            for (int i = 0; i < prop.getNumChildren(); i++)
                run(props, prop.getChild(i), includeChildren, t);
    }
View Full Code Here

Examples of net.sourceforge.processdash.hier.Prop

        run(ctx, PropertyKey.ROOT, dataDirectory);
    }

    private static void run(DashboardContext ctx, PropertyKey pKey,
            String dataDirectory) {
        Prop prop = ctx.getHierarchy().pget(pKey);
        String path = pKey.path();
        String defLogName = prop.getDefectLog();

        // If this node has a defect log,
        if (defLogName != null && defLogName.length() != 0) {
            DefectLog dl = new DefectLog(dataDirectory + defLogName, path,
                ctx.getData());
            // read all the defects in that log, and
            Defect[] defects = dl.readDefects();
            // recalculate the associated data.
            dl.recalculateData(defects, ctx);
        }

        // recursively analyze all the children of this node.
        for (int i = 0; i < prop.getNumChildren(); i++)
            run(ctx, prop.getChild(i), dataDirectory);
    }
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.