private void findProbeTasks(List<String> result, PropertyKey node) { int numChildren = context.getHierarchy().getNumChildren(node); if (numChildren == 0) { String nodePath = node.path(); if (getValue(nodePath, "PROBE Task") != null) result.add(nodePath); } else { for (int i = numChildren; i-- > 0; ) { findProbeTasks(result, context.getHierarchy().getChildKey(node, i)); } } }
protected void writeContents() throws IOException { getDataRepository().waitForCalculations(); String prefix = getPrefix(); PropertyKey projectRootKey = getStartingKey(); String projectRoot = projectRootKey.path(); String currentFilter = SelectLabelFilter.getCurrentFilter(getDataRepository(), projectRoot); boolean isSnippet = (env.containsKey(SnippetEnvironment.SNIPPET_ID)); boolean isIndiv = (getID(getPSPProperties(), projectRootKey).indexOf("Indiv") != -1); boolean useData = SelectWBSFilterTeamData.usesDataBasedFilter(getDataRepository(), projectRoot); out.println("<html><head>"); out.println("<link rel=stylesheet type='text/css' href='/style.css'>"); if (isSnippet && StringUtils.hasValue(currentFilter)) out.println("<link rel=stylesheet type='text/css' href='/reports/filter-style.css'>"); out.println("<style>"); out.println(" body { margin: 0pt; padding: 2px }"); out.println(" h1 { margin: 0pt; padding: 0pt }"); out.println(" h2 { margin: 0pt; padding: 0pt }"); out.println("</style></head><body>"); out.print("<h1 style='margin-top:0pt'><!-- editLink -->"); out.print(HTMLUtils.escapeEntities(projectRoot)); out.println("</h1>"); out.print("<h2>"); writeFilterIcon(projectRoot, currentFilter); if (isIndiv) writeHierarchyIconIndiv(projectRoot); else if (useData) writeHierarchyIconData(projectRoot); else writeHierarchyIconFrame(prefix, projectRoot); out.println("</h2>"); String cmsPageTitle = (String) env.get("cmsPageTitle"); if (cmsPageTitle != null) { out.print("<h2>"); out.print(HTMLUtils.escapeEntities(cmsPageTitle)); out.println("</h2>"); } out.println("</body></html>"); }