Search in sources :

Example 6 with PropertyKey

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);
    }
}
Also used : DefectLog(net.sourceforge.processdash.log.defects.DefectLog) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 7 with PropertyKey

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);
}
Also used : PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 8 with PropertyKey

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);
}
Also used : PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 9 with PropertyKey

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);
    }
}
Also used : DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) ScriptID(net.sourceforge.processdash.process.ScriptID) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 10 with PropertyKey

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);
}
Also used : EscapeString(net.sourceforge.processdash.util.EscapeString) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Aggregations

PropertyKey (net.sourceforge.processdash.hier.PropertyKey)125 DashHierarchy (net.sourceforge.processdash.hier.DashHierarchy)40 Prop (net.sourceforge.processdash.hier.Prop)16 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)10 SimpleData (net.sourceforge.processdash.data.SimpleData)7 ArrayList (java.util.ArrayList)6 Enumeration (java.util.Enumeration)6 IOException (java.io.IOException)5 Iterator (java.util.Iterator)5 StringTokenizer (java.util.StringTokenizer)5 TreePath (javax.swing.tree.TreePath)5 ListData (net.sourceforge.processdash.data.ListData)5 DefectLog (net.sourceforge.processdash.log.defects.DefectLog)5 List (java.util.List)4 ProcessDashboard (net.sourceforge.processdash.ProcessDashboard)4 HierarchyAlterer (net.sourceforge.processdash.hier.HierarchyAlterer)4 HierarchyAlterationException (net.sourceforge.processdash.hier.HierarchyAlterer.HierarchyAlterationException)4 DefectLogID (net.sourceforge.processdash.log.defects.DefectLogID)4 TinyCGIException (net.sourceforge.processdash.net.http.TinyCGIException)4 Point (java.awt.Point)3