* @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);
}