Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.PropertyKey.path()


      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (!checkTimeData(cKey.path(), expectedTimes[a][b][c]))
            foundErr = true;
        }
      }
    }
    if (foundErr)
View Full Code Here


  private String getPathStr(int[] newPath) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    PropertyKey key = PropertyKey.ROOT;
    for (int i = 0; i < newPath.length; i++)
      key = hier.getChildKey(key, newPath[i]);
    return key.path();
  }

  private int[] getPathFor(String path) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
View Full Code Here

      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (path.equals(cKey.path()))
            return new int[] { a, b, c };
        }
      }
    }
    new Exception("no node found for path " + path).printStackTrace();
View Full Code Here

            if (StringUtils.hasValue(templateID))
                node = node.getParent();
            else if (PropertyKey.ROOT.equals(node))
                return "/";
            else
                return node.path();
        }
        return null;
    }

View Full Code Here


    private void maybeRenameSelectedProject() {
        // determine which team project is selected. If none, abort.
        PropertyKey projectNode = getSelectedTreeNode();
        String projectPath = projectNode.path();
        String templateID = ctx.getHierarchy().getID(projectNode);
        if (!StringUtils.hasValue(templateID))
            return;

        // Create objects we will use in a dialog
View Full Code Here

                    // if this caused the old parent of the project to become
                    // childless, delete that parent (and grandparent, etc)
                    PropertyKey oldParent = projectNode.getParent();
                    while (ctx.getHierarchy().getNumChildren(oldParent) == 0) {
                        hierarchyAlterer.deleteNode(oldParent.path());
                        oldParent = oldParent.getParent();
                    }

                    // point the "active task" at the renamed project.
                    PropertyKey newNode = ctx.getHierarchy().findExistingKey(
View Full Code Here



    private void maybeDeleteSelectedProject() {
        PropertyKey selectedNode = getSelectedTreeNode();
        String projectPath = selectedNode.path();
        String templateID = ctx.getHierarchy().getID(selectedNode);
        if (okToDeleteProject(projectPath, templateID)) {
            try {
                DashController.getHierarchyAlterer().deleteNode(projectPath);
            } catch (HierarchyAlterationException e) {
View Full Code Here

            checkEnabledForProcess(templateID);
            if (!isEnabled())
                return;

            StringBuilder uri = new StringBuilder();
            uri.append(HTMLUtils.urlEncodePath(projectKey.path()));

            int slashPos = templateID.indexOf('/');
            String processID = templateID.substring(0, slashPos);
            if (isRelaunchSupported(processID))
                uri.append("//").append(processID)
View Full Code Here

        if (key != null) {
            int numKids = hierarchy.getNumChildren(key);
            for (int i = 0;   i < numKids;  i++) {
                PropertyKey child = hierarchy.getChildKey(key, i);
                children.add(new EVTask(this, taskListName,
                                        child.name(), child.path(), child,
                                        data, hierarchy, listener));
                addedChild = true;
            }
        }
        return addedChild;
View Full Code Here

    private String findProjectWithID(PropertyKey parent, String projectID) {
        for (int i = ctx.getHierarchy().getNumChildren(parent); i-- > 0;) {
            PropertyKey node = ctx.getHierarchy().getChildKey(parent, i);

            // check to see if THIS node is the project we're looking for.
            String path = node.path();
            if (pathMatchesProjectID(path, projectID))
                return path;

            // Otherwise, recurse into children to look for the project.
            String childResult = findProjectWithID(node, projectID);
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.