use of net.sourceforge.processdash.hier.PropertyKey in project processdash by dtuma.
the class HierarchySynchronizer method saveDefect.
public void saveDefect(final String path, final Defect d) {
PropertyKey key = hierarchy.findExistingKey(path);
final String filename = hierarchy.pget(key).getDefectLog();
if (StringUtils.hasValue(filename)) {
DefectLog log = new DefectLog(dataDirectory + filename, path, dataRepository);
log.writeDefect(d);
}
}
use of net.sourceforge.processdash.hier.PropertyKey in project processdash by dtuma.
the class DashController method showDefectLogEditorImpl.
private static void showDefectLogEditorImpl(String path) {
PropertyKey key = dash.props.findExistingKey(path);
dash.configure_button.startDefectLog(key);
}
use of net.sourceforge.processdash.hier.PropertyKey in project processdash by dtuma.
the class DashController method showTimeLogEditorImpl.
private static void showTimeLogEditorImpl(String path) {
PropertyKey key = dash.props.findExistingKey(path);
dash.configure_button.startTimeLog(key);
}
use of net.sourceforge.processdash.hier.PropertyKey in project processdash by dtuma.
the class ScriptBrowser method applyFilter.
private void applyFilter() {
list.getSelectionModel().clearSelection();
scriptList.clear();
DefaultMutableTreeNode selected = getSelectedNode();
if (selected == null)
return;
PropertyKey key = treeModel.getPropKey(useProps, selected.getPath());
if (key == null)
return;
List<ScriptID> scripts = ScriptEnumerator.getScripts(dashboard, key);
if (scripts == null || scripts.size() == 0)
return;
ScriptID script, defaultScript = scripts.get(0);
String dataPath = defaultScript.getDataPath();
for (int i = 1; i < scripts.size(); i++) {
script = scripts.get(i);
if (dataPath != null && !dataPath.equals(script.getDataPath()))
break;
scriptList.addElement(script);
dataPath = script.getDataPath();
if (defaultScript.scriptEquals(script))
list.getSelectionModel().addSelectionInterval(i - 1, i - 1);
}
}
use of net.sourceforge.processdash.hier.PropertyKey in project processdash by dtuma.
the class HTMLPreprocessor method recurseTreeNode.
private void recurseTreeNode(StringBuffer buf, String loopContents, PropertyKey node, int depth, String relPath, String expandName, boolean outputNode, int remainingDepth, boolean parentLast) {
boolean isLeaf = (props.getNumChildren(node) == 0);
String expansionName = makeExpansionName(relPath, expandName);
boolean isExpanded = (expandName == null || outputNode == false || testDataElem("[" + expansionName + "]"));
if (outputNode && !parentLast)
outputTreeNode(buf, loopContents, node, depth, relPath, expansionName, isLeaf, isExpanded);
if (remainingDepth > 0 && isExpanded) {
int numKids = props.getNumChildren(node);
for (int i = 0; i < numKids; i++) {
PropertyKey child = props.getChildKey(node, i);
recurseTreeNode(buf, loopContents, child, depth + 1, relPath + "/" + child.name(), expandName, true, remainingDepth - 1, parentLast);
}
}
if (outputNode && parentLast)
outputTreeNode(buf, loopContents, node, depth, relPath, expansionName, isLeaf, isExpanded);
}
Aggregations