private String getFillColor(PackageDoc pkg) { String color = "white"; if (pkg.tags(TAG_CATEGORY).length > 0 && categories.containsKey(pkg.tags(TAG_CATEGORY)[0].text())) { color = categories.get(pkg.tags(TAG_CATEGORY)[0].text()).getFillColor(); } if (pkg.tags(TAG_LANDMARK).length > 0) { color = "khaki1"; } return color; }
private void renderPackage( StringBuilder buf, PackageDoc pkg, int prefixLen) { checkCategoryExistance(pkg); String href = pkg.name().replace('.', '/') + "/package-summary.html"; buf.append(getNodeId(pkg)); buf.append(" [label=\""); buf.append(pkg.name().substring(prefixLen)); buf.append("\", style=\"filled"); if (pkg.tags("@deprecated").length > 0) { buf.append(",dotted"); } buf.append("\", fillcolor=\""); buf.append(getFillColor(pkg)); buf.append("\", href=\""); buf.append(href); buf.append("\"];"); buf.append(NEWLINE); }
private String getLineColor(PackageDoc pkg, Edge edge) { if (edge.getTarget() instanceof ClassDoc) { //we have a class return getLineColor( pkg, (ClassDoc) edge.getSource(), (ClassDoc) edge.getTarget()); } else { //not a class (a package or something) String color = "#000000"; if (pkg != null && pkg.tags(TAG_CATEGORY).length > 0 && categories.containsKey(pkg.tags(TAG_CATEGORY)[0].text())) { color = categories.get(pkg.tags(TAG_CATEGORY)[0].text()).getLineColor(); } return color; } }
protected Package parsePackage(PackageDoc packageDoc) { Package packageNode = objectFactory.createPackage(); packageNode.setName(packageDoc.name()); String comment = packageDoc.commentText(); if (comment.length() > 0) { packageNode.setComment(comment); } for (Tag tag : packageDoc.tags()) { packageNode.getTag().add(parseTag(tag)); } return packageNode; }
/** * Gets all tags from a method and its containing class and package * * @param methodDoc the method doc * @return a combined list of tags */ static TagLists getTagsUpwards(MethodDoc methodDoc) { List<Tag> methodTags = getInheritableTags(methodDoc); List<Tag> classTags = getInheritableTags(methodDoc.containingClass()); Tag[] packageTags = methodDoc.containingClass().containingPackage().tags(); return new TagLists(methodTags, classTags, asList(packageTags)); }
for (Tag t: pkg.tags(TAG_EXCLUDE)) { if (t.text() == null || t.text().trim().length() == 0) { continue; for (Tag t: pkg.tags(TAG_EXCLUDE)) { if (t.text() == null || t.text().trim().length() == 0) { continue; for (Tag t: pkg.tags(TAG_EXCLUDE)) { if (t.text() == null || t.text().trim().length() == 0) { continue;
/** * Add the package deprecation information to the documentation tree. * * @param div the content tree to which the deprecation information will be added */ public void addDeprecationInfo(Content div) { Tag[] deprs = packageDoc.tags("deprecated"); if (Util.isDeprecated(packageDoc)) { HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV); deprDiv.addStyle(HtmlStyle.deprecatedContent); Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); deprDiv.addContent(deprPhrase); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv); } } div.addContent(deprDiv); } }
/** * Add the package deprecation information to the documentation tree. * * @param div the content tree to which the deprecation information will be added */ public void addDeprecationInfo(Content div) { Tag[] deprs = packageDoc.tags("deprecated"); if (Util.isDeprecated(packageDoc)) { HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV); deprDiv.addStyle(HtmlStyle.deprecatedContent); Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); deprDiv.addContent(deprPhrase); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv); } } div.addContent(deprDiv); } }
/** * Add the profile package deprecation information to the documentation tree. * * @param li the content tree to which the deprecation information will be added * @param pkg the PackageDoc that is added */ public void addPackageDeprecationInfo(Content li, PackageDoc pkg) { Tag[] deprs; if (Util.isDeprecated(pkg)) { deprs = pkg.tags("deprecated"); HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV); deprDiv.addStyle(HtmlStyle.deprecatedContent); Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); deprDiv.addContent(deprPhrase); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { addInlineDeprecatedComment(pkg, deprs[0], deprDiv); } } li.addContent(deprDiv); } }