8220202: Simplify/standardize method naming for HtmlTree
Reviewed-by: hannesw
This commit is contained in:
parent
3a072e4e45
commit
1b9db9b7a1
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -78,8 +78,8 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
protected void addTypeParameters(ExecutableElement member, Content htmltree) {
|
||||
Content typeParameters = getTypeParameters(member);
|
||||
if (!typeParameters.isEmpty()) {
|
||||
htmltree.addContent(typeParameters);
|
||||
htmltree.addContent(Contents.SPACE);
|
||||
htmltree.add(typeParameters);
|
||||
htmltree.add(Contents.SPACE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,16 +100,16 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
@Override
|
||||
protected Content getDeprecatedLink(Element member) {
|
||||
Content deprecatedLinkContent = new ContentBuilder();
|
||||
deprecatedLinkContent.addContent(utils.getFullyQualifiedName(member));
|
||||
deprecatedLinkContent.add(utils.getFullyQualifiedName(member));
|
||||
if (!utils.isConstructor(member)) {
|
||||
deprecatedLinkContent.addContent(".");
|
||||
deprecatedLinkContent.addContent(member.getSimpleName());
|
||||
deprecatedLinkContent.add(".");
|
||||
deprecatedLinkContent.add(member.getSimpleName());
|
||||
}
|
||||
String signature = utils.flatSignature((ExecutableElement) member);
|
||||
if (signature.length() > 2) {
|
||||
deprecatedLinkContent.addContent(Contents.ZERO_WIDTH_SPACE);
|
||||
deprecatedLinkContent.add(Contents.ZERO_WIDTH_SPACE);
|
||||
}
|
||||
deprecatedLinkContent.addContent(signature);
|
||||
deprecatedLinkContent.add(signature);
|
||||
|
||||
return writer.getDocLink(MEMBER, utils.getEnclosingTypeElement(member), member, deprecatedLinkContent);
|
||||
}
|
||||
@ -131,7 +131,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
name(ee), false));
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
addParameters(ee, false, code, name(ee).length() - 1);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -143,7 +143,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
*/
|
||||
@Override
|
||||
protected void addInheritedSummaryLink(TypeElement te, Element member, Content linksTree) {
|
||||
linksTree.addContent(writer.getDocLink(MEMBER, te, member, name(member), false));
|
||||
linksTree.add(writer.getDocLink(MEMBER, te, member, name(member), false));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,10 +158,10 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
boolean isVarArg, Content tree) {
|
||||
Content link = writer.getLink(new LinkInfoImpl(configuration, EXECUTABLE_MEMBER_PARAM,
|
||||
param.asType()).varargs(isVarArg));
|
||||
tree.addContent(link);
|
||||
tree.add(link);
|
||||
if(name(param).length() > 0) {
|
||||
tree.addContent(Contents.SPACE);
|
||||
tree.addContent(name(param));
|
||||
tree.add(Contents.SPACE);
|
||||
tree.add(name(param));
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,12 +176,12 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
protected void addReceiverAnnotations(ExecutableElement member, TypeMirror rcvrType,
|
||||
List<? extends AnnotationMirror> annotationMirrors, Content tree) {
|
||||
writer.addReceiverAnnotationInfo(member, rcvrType, annotationMirrors, tree);
|
||||
tree.addContent(Contents.SPACE);
|
||||
tree.addContent(utils.getTypeName(rcvrType, false));
|
||||
tree.add(Contents.SPACE);
|
||||
tree.add(utils.getTypeName(rcvrType, false));
|
||||
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, RECEIVER_TYPE, rcvrType);
|
||||
tree.addContent(writer.getTypeParameterLinks(linkInfo));
|
||||
tree.addContent(Contents.SPACE);
|
||||
tree.addContent("this");
|
||||
tree.add(writer.getTypeParameterLinks(linkInfo));
|
||||
tree.add(Contents.SPACE);
|
||||
tree.add("this");
|
||||
}
|
||||
|
||||
|
||||
@ -216,7 +216,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
}
|
||||
int paramstart;
|
||||
for (paramstart = 0; paramstart < parameters.size(); paramstart++) {
|
||||
paramTree.addContent(sep);
|
||||
paramTree.add(sep);
|
||||
VariableElement param = parameters.get(paramstart);
|
||||
|
||||
if (param.getKind() != ElementKind.INSTANCE_INIT) {
|
||||
@ -225,8 +225,8 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
writer.addAnnotationInfo(indent.length(),
|
||||
member, param, paramTree);
|
||||
if (foundAnnotations) {
|
||||
paramTree.addContent(DocletConstants.NL);
|
||||
paramTree.addContent(indent);
|
||||
paramTree.add(DocletConstants.NL);
|
||||
paramTree.add(indent);
|
||||
}
|
||||
}
|
||||
addParam(member, param,
|
||||
@ -236,28 +236,28 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
}
|
||||
|
||||
for (int i = paramstart + 1; i < parameters.size(); i++) {
|
||||
paramTree.addContent(",");
|
||||
paramTree.addContent(DocletConstants.NL);
|
||||
paramTree.addContent(indent);
|
||||
paramTree.add(",");
|
||||
paramTree.add(DocletConstants.NL);
|
||||
paramTree.add(indent);
|
||||
if (includeAnnotations) {
|
||||
boolean foundAnnotations =
|
||||
writer.addAnnotationInfo(indent.length(), member, parameters.get(i),
|
||||
paramTree);
|
||||
if (foundAnnotations) {
|
||||
paramTree.addContent(DocletConstants.NL);
|
||||
paramTree.addContent(indent);
|
||||
paramTree.add(DocletConstants.NL);
|
||||
paramTree.add(indent);
|
||||
}
|
||||
}
|
||||
addParam(member, parameters.get(i), (i == parameters.size() - 1) && member.isVarArgs(),
|
||||
paramTree);
|
||||
}
|
||||
if (paramTree.isEmpty()) {
|
||||
htmltree.addContent("()");
|
||||
htmltree.add("()");
|
||||
} else {
|
||||
htmltree.addContent(Contents.ZERO_WIDTH_SPACE);
|
||||
htmltree.addContent("(");
|
||||
htmltree.addContent(paramTree);
|
||||
paramTree.addContent(")");
|
||||
htmltree.add(Contents.ZERO_WIDTH_SPACE);
|
||||
htmltree.add("(");
|
||||
htmltree.add(paramTree);
|
||||
paramTree.add(")");
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,19 +271,19 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
List<? extends TypeMirror> exceptions = member.getThrownTypes();
|
||||
if (!exceptions.isEmpty()) {
|
||||
CharSequence indent = makeSpace(indentSize + 1 - 7);
|
||||
htmltree.addContent(DocletConstants.NL);
|
||||
htmltree.addContent(indent);
|
||||
htmltree.addContent("throws ");
|
||||
htmltree.add(DocletConstants.NL);
|
||||
htmltree.add(indent);
|
||||
htmltree.add("throws ");
|
||||
indent = makeSpace(indentSize + 1);
|
||||
Content link = writer.getLink(new LinkInfoImpl(configuration, MEMBER, exceptions.get(0)));
|
||||
htmltree.addContent(link);
|
||||
htmltree.add(link);
|
||||
for(int i = 1; i < exceptions.size(); i++) {
|
||||
htmltree.addContent(",");
|
||||
htmltree.addContent(DocletConstants.NL);
|
||||
htmltree.addContent(indent);
|
||||
htmltree.add(",");
|
||||
htmltree.add(DocletConstants.NL);
|
||||
htmltree.add(indent);
|
||||
Content exceptionLink = writer.getLink(new LinkInfoImpl(configuration, MEMBER,
|
||||
exceptions.get(i)));
|
||||
htmltree.addContent(exceptionLink);
|
||||
htmltree.add(exceptionLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
for (Element element : memberlist) {
|
||||
addDescription(dl, element);
|
||||
}
|
||||
contentTree.addContent(dl);
|
||||
contentTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
for (SearchIndexItem sii : searchList) {
|
||||
addDescription(sii, dl);
|
||||
}
|
||||
contentTree.addContent(dl);
|
||||
contentTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,16 +161,16 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
contentTree.addContent(dl);
|
||||
contentTree.add(dl);
|
||||
}
|
||||
|
||||
protected void addHeading(Character uc, Content contentTree) {
|
||||
String unicode = uc.toString();
|
||||
contentTree.addContent(getMarkerAnchorForIndex(unicode));
|
||||
contentTree.add(getMarkerAnchorForIndex(unicode));
|
||||
Content headContent = new StringContent(unicode);
|
||||
Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, false,
|
||||
HtmlStyle.title, headContent);
|
||||
contentTree.addContent(heading);
|
||||
contentTree.add(heading);
|
||||
}
|
||||
|
||||
protected void addDescription(Content dl, Element element) {
|
||||
@ -223,13 +223,13 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
si.setLabel(moduleName);
|
||||
si.setCategory(SearchIndexItem.Category.MODULES);
|
||||
Content dt = HtmlTree.DT(link);
|
||||
dt.addContent(" - ");
|
||||
dt.addContent(contents.module_);
|
||||
dt.addContent(" " + moduleName);
|
||||
dlTree.addContent(dt);
|
||||
dt.add(" - ");
|
||||
dt.add(contents.module_);
|
||||
dt.add(" " + moduleName);
|
||||
dlTree.add(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
addSummaryComment(mdle, dd);
|
||||
dlTree.addContent(dd);
|
||||
dlTree.add(dd);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -247,13 +247,13 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
si.setLabel(utils.getPackageName(pkg));
|
||||
si.setCategory(SearchIndexItem.Category.PACKAGES);
|
||||
Content dt = HtmlTree.DT(link);
|
||||
dt.addContent(" - ");
|
||||
dt.addContent(contents.package_);
|
||||
dt.addContent(" " + utils.getPackageName(pkg));
|
||||
dlTree.addContent(dt);
|
||||
dt.add(" - ");
|
||||
dt.add(contents.package_);
|
||||
dt.add(" " + utils.getPackageName(pkg));
|
||||
dlTree.add(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
addSummaryComment(pkg, dd);
|
||||
dlTree.addContent(dd);
|
||||
dlTree.add(dd);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -270,12 +270,12 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
si.setLabel(utils.getSimpleName(typeElement));
|
||||
si.setCategory(SearchIndexItem.Category.TYPES);
|
||||
Content dt = HtmlTree.DT(link);
|
||||
dt.addContent(" - ");
|
||||
dt.add(" - ");
|
||||
addClassInfo(typeElement, dt);
|
||||
dlTree.addContent(dt);
|
||||
dlTree.add(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
addComment(typeElement, dd);
|
||||
dlTree.addContent(dd);
|
||||
dlTree.add(dd);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -286,7 +286,7 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
* @param contentTree the content tree to which the class info will be added
|
||||
*/
|
||||
protected void addClassInfo(TypeElement te, Content contentTree) {
|
||||
contentTree.addContent(contents.getContent("doclet.in",
|
||||
contentTree.add(contents.getContent("doclet.in",
|
||||
utils.getTypeElementName(te, false),
|
||||
getPackageLink(utils.containingPackage(te),
|
||||
utils.getPackageName(utils.containingPackage(te)))
|
||||
@ -320,12 +320,12 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.memberNameLink,
|
||||
getDocLink(LinkInfoImpl.Kind.INDEX, member, name));
|
||||
Content dt = HtmlTree.DT(span);
|
||||
dt.addContent(" - ");
|
||||
dt.add(" - ");
|
||||
addMemberDesc(member, dt);
|
||||
dlTree.addContent(dt);
|
||||
dlTree.add(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
addComment(member, dd);
|
||||
dlTree.addContent(dd);
|
||||
dlTree.add(dd);
|
||||
}
|
||||
|
||||
protected void addDescription(SearchIndexItem sii, Content dlTree) {
|
||||
@ -333,16 +333,16 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
siiPath += sii.getUrl();
|
||||
HtmlTree labelLink = HtmlTree.A(siiPath, new StringContent(sii.getLabel()));
|
||||
Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.searchTagLink, labelLink));
|
||||
dt.addContent(" - ");
|
||||
dt.addContent(contents.getContent("doclet.Search_tag_in", sii.getHolder()));
|
||||
dlTree.addContent(dt);
|
||||
dt.add(" - ");
|
||||
dt.add(contents.getContent("doclet.Search_tag_in", sii.getHolder()));
|
||||
dlTree.add(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
if (sii.getDescription().isEmpty()) {
|
||||
dd.addContent(Contents.SPACE);
|
||||
dd.add(Contents.SPACE);
|
||||
} else {
|
||||
dd.addContent(sii.getDescription());
|
||||
dd.add(sii.getDescription());
|
||||
}
|
||||
dlTree.addContent(dd);
|
||||
dlTree.add(dd);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -360,17 +360,17 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.deprecationBlock);
|
||||
if (utils.isDeprecated(element)) {
|
||||
div.addContent(span);
|
||||
div.add(span);
|
||||
tags = utils.getBlockTags(element, DocTree.Kind.DEPRECATED);
|
||||
if (!tags.isEmpty())
|
||||
addInlineDeprecatedComment(element, tags.get(0), div);
|
||||
contentTree.addContent(div);
|
||||
contentTree.add(div);
|
||||
} else {
|
||||
TypeElement encl = utils.getEnclosingTypeElement(element);
|
||||
while (encl != null) {
|
||||
if (utils.isDeprecated(encl)) {
|
||||
div.addContent(span);
|
||||
contentTree.addContent(div);
|
||||
div.add(span);
|
||||
contentTree.add(div);
|
||||
break;
|
||||
}
|
||||
encl = utils.getEnclosingTypeElement(encl);
|
||||
@ -393,15 +393,15 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
Content resource = contents.getContent(utils.isStatic(member)
|
||||
? "doclet.Static_variable_in"
|
||||
: "doclet.Variable_in", classdesc);
|
||||
contentTree.addContent(resource);
|
||||
contentTree.add(resource);
|
||||
} else if (utils.isConstructor(member)) {
|
||||
contentTree.addContent(
|
||||
contentTree.add(
|
||||
contents.getContent("doclet.Constructor_for", classdesc));
|
||||
} else if (utils.isMethod(member)) {
|
||||
Content resource = contents.getContent(utils.isStatic(member)
|
||||
? "doclet.Static_method_in"
|
||||
: "doclet.Method_in", classdesc);
|
||||
contentTree.addContent(resource);
|
||||
contentTree.add(resource);
|
||||
}
|
||||
addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing,
|
||||
false, contentTree);
|
||||
|
@ -218,7 +218,7 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
* @param htmltree the content tree to which the name will be added.
|
||||
*/
|
||||
protected void addName(String name, Content htmltree) {
|
||||
htmltree.addContent(name);
|
||||
htmltree.add(name);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -255,8 +255,8 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
}
|
||||
if (!set.isEmpty()) {
|
||||
String mods = set.stream().map(Modifier::toString).collect(Collectors.joining(" "));
|
||||
htmltree.addContent(mods);
|
||||
htmltree.addContent(Contents.SPACE);
|
||||
htmltree.add(mods);
|
||||
htmltree.add(Contents.SPACE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -283,8 +283,8 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
HtmlTree code = new HtmlTree(HtmlTag.CODE);
|
||||
addModifier(member, code);
|
||||
if (type == null) {
|
||||
code.addContent(utils.isClass(member) ? "class" : "interface");
|
||||
code.addContent(Contents.SPACE);
|
||||
code.add(utils.isClass(member) ? "class" : "interface");
|
||||
code.add(Contents.SPACE);
|
||||
} else {
|
||||
List<? extends TypeParameterElement> list = utils.isExecutableElement(member)
|
||||
? ((ExecutableElement)member).getTypeParameters()
|
||||
@ -292,24 +292,24 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
if (list != null && !list.isEmpty()) {
|
||||
Content typeParameters = ((AbstractExecutableMemberWriter) this)
|
||||
.getTypeParameters((ExecutableElement)member);
|
||||
code.addContent(typeParameters);
|
||||
code.add(typeParameters);
|
||||
//Code to avoid ugly wrapping in member summary table.
|
||||
if (typeParameters.charCount() > 10) {
|
||||
code.addContent(new HtmlTree(HtmlTag.BR));
|
||||
code.add(new HtmlTree(HtmlTag.BR));
|
||||
} else {
|
||||
code.addContent(Contents.SPACE);
|
||||
code.add(Contents.SPACE);
|
||||
}
|
||||
code.addContent(
|
||||
code.add(
|
||||
writer.getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type)));
|
||||
} else {
|
||||
code.addContent(
|
||||
code.add(
|
||||
writer.getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type)));
|
||||
}
|
||||
|
||||
}
|
||||
tdSummaryType.addContent(code);
|
||||
tdSummaryType.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -320,24 +320,24 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
*/
|
||||
private void addModifier(Element member, Content code) {
|
||||
if (utils.isProtected(member)) {
|
||||
code.addContent("protected ");
|
||||
code.add("protected ");
|
||||
} else if (utils.isPrivate(member)) {
|
||||
code.addContent("private ");
|
||||
code.add("private ");
|
||||
} else if (!utils.isPublic(member)) { // Package private
|
||||
code.addContent(resources.getText("doclet.Package_private"));
|
||||
code.addContent(" ");
|
||||
code.add(resources.getText("doclet.Package_private"));
|
||||
code.add(" ");
|
||||
}
|
||||
boolean isAnnotatedTypeElement = utils.isAnnotationType(member.getEnclosingElement());
|
||||
if (!isAnnotatedTypeElement && utils.isMethod(member)) {
|
||||
if (!utils.isInterface(member.getEnclosingElement()) && utils.isAbstract(member)) {
|
||||
code.addContent("abstract ");
|
||||
code.add("abstract ");
|
||||
}
|
||||
if (utils.isDefault(member)) {
|
||||
code.addContent("default ");
|
||||
code.add("default ");
|
||||
}
|
||||
}
|
||||
if (utils.isStatic(member)) {
|
||||
code.addContent("static ");
|
||||
code.add("static ");
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
if (!output.isEmpty()) {
|
||||
Content deprecatedContent = output;
|
||||
Content div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprecatedContent);
|
||||
contentTree.addContent(div);
|
||||
contentTree.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,8 +424,8 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
&& !utils.isAnnotationType(element)) {
|
||||
HtmlTree name = new HtmlTree(HtmlTag.SPAN);
|
||||
name.setStyle(HtmlStyle.typeNameLabel);
|
||||
name.addContent(name(te) + ".");
|
||||
typeContent.addContent(name);
|
||||
name.add(name(te) + ".");
|
||||
typeContent.add(name);
|
||||
}
|
||||
addSummaryLink(utils.isClass(element) || utils.isInterface(element)
|
||||
? LinkInfoImpl.Kind.CLASS_USE
|
||||
@ -435,7 +435,7 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
|
||||
writer.addSummaryLinkComment(this, element, desc);
|
||||
useTable.addRow(summaryType, typeContent, desc);
|
||||
}
|
||||
contentTree.addContent(useTable.toContent());
|
||||
contentTree.add(useTable.toContent());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,9 +139,9 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
|
||||
addOverview(main);
|
||||
Content footer = HtmlTree.FOOTER();
|
||||
addNavigationBarFooter(footer);
|
||||
body.addContent(header);
|
||||
body.addContent(main);
|
||||
body.addContent(footer);
|
||||
body.add(header);
|
||||
body.add(main);
|
||||
body.add(footer);
|
||||
printHtmlDocument(
|
||||
configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle),
|
||||
description,
|
||||
@ -171,9 +171,9 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
|
||||
addOverview(main);
|
||||
Content footer = HtmlTree.FOOTER();
|
||||
addNavigationBarFooter(footer);
|
||||
body.addContent(header);
|
||||
body.addContent(main);
|
||||
body.addContent(footer);
|
||||
body.add(header);
|
||||
body.add(main);
|
||||
body.add(footer);
|
||||
printHtmlDocument(
|
||||
configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle),
|
||||
description,
|
||||
@ -231,8 +231,8 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
addAllClassesLink(ul);
|
||||
addAllPackagesLink(ul);
|
||||
htmlTree.addContent(ul);
|
||||
header.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
header.add(htmlTree);
|
||||
addModulesList(main);
|
||||
}
|
||||
|
||||
@ -254,8 +254,8 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
|
||||
addAllClassesLink(ul);
|
||||
addAllPackagesLink(ul);
|
||||
addAllModulesLink(ul);
|
||||
htmlTree.addContent(ul);
|
||||
header.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
header.add(htmlTree);
|
||||
addModulePackagesList(modules, text, tableSummary, main, mdle);
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
|
||||
HtmlStyle.title, title);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
body.addContent(div);
|
||||
body.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,9 +124,9 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
|
||||
addOverview(main);
|
||||
Content footer = HtmlTree.FOOTER();
|
||||
addNavigationBarFooter(footer);
|
||||
body.addContent(header);
|
||||
body.addContent(main);
|
||||
body.addContent(footer);
|
||||
body.add(header);
|
||||
body.add(main);
|
||||
body.add(footer);
|
||||
printHtmlDocument(
|
||||
configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle),
|
||||
description, body);
|
||||
@ -165,8 +165,8 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
|
||||
if (configuration.showModules && configuration.modules.size() > 1) {
|
||||
addAllModulesLink(ul);
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
header.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
header.add(htmlTree);
|
||||
addPackagesList(main);
|
||||
}
|
||||
}
|
||||
@ -182,7 +182,7 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
|
||||
HtmlStyle.title, title);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
body.addContent(div);
|
||||
body.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,9 +92,9 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
addExtendsImplements(parent, local, li);
|
||||
addLevelInfo(local, classtree.directSubClasses(local, isEnum),
|
||||
isEnum, li); // Recurse
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
contentTree.addContent(ul);
|
||||
contentTree.add(ul);
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
HtmlTree htmlTree = HtmlTree.SECTION(sectionHeading);
|
||||
addLevelInfo(!utils.isInterface(firstTypeElement) ? firstTypeElement : null,
|
||||
sset, isEnums, htmlTree);
|
||||
div.addContent(htmlTree);
|
||||
div.add(htmlTree);
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,21 +147,21 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
if (utils.isInterface(typeElement)) {
|
||||
contentTree.addContent(" (");
|
||||
contentTree.addContent(contents.also);
|
||||
contentTree.addContent(" extends ");
|
||||
contentTree.add(" (");
|
||||
contentTree.add(contents.also);
|
||||
contentTree.add(" extends ");
|
||||
} else {
|
||||
contentTree.addContent(" (implements ");
|
||||
contentTree.add(" (implements ");
|
||||
}
|
||||
} else {
|
||||
contentTree.addContent(", ");
|
||||
contentTree.add(", ");
|
||||
}
|
||||
addPreQualifiedClassLink(LinkInfoImpl.Kind.TREE, intf, contentTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isFirst) {
|
||||
contentTree.addContent(")");
|
||||
contentTree.add(")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,13 +113,13 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
|
||||
Content htmlTree = HtmlTree.MAIN();
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
|
||||
HtmlStyle.bar, contents.allClassesLabel);
|
||||
htmlTree.addContent(heading);
|
||||
htmlTree.add(heading);
|
||||
Content ul = new HtmlTree(HtmlTag.UL);
|
||||
// Generate the class links and add it to the tdFont tree.
|
||||
addAllClasses(ul, wantFrames);
|
||||
HtmlTree div = HtmlTree.DIV(HtmlStyle.indexContainer, ul);
|
||||
htmlTree.addContent(div);
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(div);
|
||||
body.add(htmlTree);
|
||||
printHtmlDocument(null, "all classes (frame)", body);
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
|
||||
linkContent = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, typeElement).label(label));
|
||||
}
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
content.addContent(li);
|
||||
content.add(li);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,17 +105,17 @@ public class AllClassesIndexWriter extends HtmlDocletWriter {
|
||||
HtmlTree header = HtmlTree.HEADER();
|
||||
addTop(header);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
header.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(header);
|
||||
header.add(navBar.getContent(true));
|
||||
bodyTree.add(header);
|
||||
Content allClassesContent = new ContentBuilder();
|
||||
addContents(allClassesContent);
|
||||
mainTree.addContent(allClassesContent);
|
||||
bodyTree.addContent(mainTree);
|
||||
mainTree.add(allClassesContent);
|
||||
bodyTree.add(mainTree);
|
||||
Content footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
bodyTree.addContent(footer);
|
||||
bodyTree.add(footer);
|
||||
printHtmlDocument(null, "class index", bodyTree);
|
||||
}
|
||||
|
||||
@ -150,14 +150,14 @@ public class AllClassesIndexWriter extends HtmlDocletWriter {
|
||||
Content pHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, titleContent);
|
||||
Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading);
|
||||
content.addContent(headerDiv);
|
||||
content.add(headerDiv);
|
||||
if (!table.isEmpty()) {
|
||||
HtmlTree li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, li);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.allClassesContainer);
|
||||
div.addContent(ul);
|
||||
content.addContent(div);
|
||||
div.add(ul);
|
||||
content.add(div);
|
||||
if (table.needsScript()) {
|
||||
getMainBodyScript().append(table.getScript());
|
||||
}
|
||||
@ -176,7 +176,7 @@ public class AllClassesIndexWriter extends HtmlDocletWriter {
|
||||
configuration, LinkInfoImpl.Kind.INDEX, klass));
|
||||
ContentBuilder description = new ContentBuilder();
|
||||
if (utils.isDeprecated(klass)) {
|
||||
description.addContent(getDeprecatedPhrase(klass));
|
||||
description.add(getDeprecatedPhrase(klass));
|
||||
List<? extends DocTree> tags = utils.getDeprecatedTrees(klass);
|
||||
if (!tags.isEmpty()) {
|
||||
addSummaryDeprecatedComment(klass, tags.get(0), description);
|
||||
|
@ -87,8 +87,8 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter {
|
||||
HtmlTree header = HtmlTree.HEADER();
|
||||
addTop(header);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
header.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(header);
|
||||
header.add(navBar.getContent(true));
|
||||
bodyTree.add(header);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.allPackagesContainer);
|
||||
addPackages(div);
|
||||
@ -96,14 +96,14 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter {
|
||||
Content pHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, titleContent);
|
||||
Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading);
|
||||
mainTree.addContent(headerDiv);
|
||||
mainTree.addContent(div);
|
||||
bodyTree.addContent(mainTree);
|
||||
mainTree.add(headerDiv);
|
||||
mainTree.add(div);
|
||||
bodyTree.add(mainTree);
|
||||
Content footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
bodyTree.addContent(footer);
|
||||
bodyTree.add(footer);
|
||||
printHtmlDocument(null, "package index", bodyTree);
|
||||
}
|
||||
|
||||
@ -126,6 +126,6 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter {
|
||||
}
|
||||
}
|
||||
HtmlTree li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
content.addContent(HtmlTree.UL(HtmlStyle.blockList, li));
|
||||
content.add(HtmlTree.UL(HtmlStyle.blockList, li));
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(
|
||||
memberSummaryTree.add(
|
||||
MarkerComments.START_OF_ANNOTATION_TYPE_FIELD_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
@ -95,7 +95,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void addAnnotationFieldDetailsMarker(Content memberDetails) {
|
||||
memberDetails.addContent(MarkerComments.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
|
||||
memberDetails.add(MarkerComments.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -104,11 +104,11 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
public void addAnnotationDetailsTreeHeader(TypeElement typeElement,
|
||||
Content memberDetailsTree) {
|
||||
if (!writer.printedAnnotationFieldHeading) {
|
||||
memberDetailsTree.addContent(links.createAnchor(
|
||||
memberDetailsTree.add(links.createAnchor(
|
||||
SectionName.ANNOTATION_TYPE_FIELD_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.fieldDetailsLabel);
|
||||
memberDetailsTree.addContent(heading);
|
||||
memberDetailsTree.add(heading);
|
||||
writer.printedAnnotationFieldHeading = true;
|
||||
}
|
||||
}
|
||||
@ -118,11 +118,11 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
public Content getAnnotationDocTreeHeader(Element member,
|
||||
Content annotationDetailsTree) {
|
||||
annotationDetailsTree.addContent(links.createAnchor(name(member)));
|
||||
annotationDetailsTree.add(links.createAnchor(name(member)));
|
||||
Content annotationDocTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(name(member));
|
||||
annotationDocTree.addContent(heading);
|
||||
heading.add(name(member));
|
||||
annotationDocTree.add(heading);
|
||||
return annotationDocTree;
|
||||
}
|
||||
|
||||
@ -136,8 +136,8 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
Content link =
|
||||
writer.getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.MEMBER, getType(member)));
|
||||
pre.addContent(link);
|
||||
pre.addContent(Contents.SPACE);
|
||||
pre.add(link);
|
||||
pre.add(Contents.SPACE);
|
||||
if (configuration.linksource) {
|
||||
Content memberName = new StringContent(name(member));
|
||||
writer.addSrcLink(member, memberName, pre);
|
||||
@ -189,7 +189,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.fieldSummaryLabel);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -220,7 +220,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(
|
||||
memberTree.add(links.createAnchor(
|
||||
SectionName.ANNOTATION_TYPE_FIELD_SUMMARY));
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
||||
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
|
||||
writer.getDocLink(context, member, name(member), false));
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(
|
||||
memberSummaryTree.add(
|
||||
MarkerComments.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
@ -99,8 +99,8 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
||||
Content dt = HtmlTree.DT(contents.default_);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
Content dd = HtmlTree.DD(new StringContent(value.toString()));
|
||||
dl.addContent(dd);
|
||||
annotationDocTree.addContent(dl);
|
||||
dl.add(dd);
|
||||
annotationDocTree.add(dl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.annotateTypeOptionalMemberSummaryLabel);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -137,7 +137,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(
|
||||
memberTree.add(links.createAnchor(
|
||||
SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY));
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(
|
||||
memberSummaryTree.add(
|
||||
MarkerComments.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
@ -97,7 +97,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void addAnnotationDetailsMarker(Content memberDetails) {
|
||||
memberDetails.addContent(MarkerComments.START_OF_ANNOTATION_TYPE_DETAILS);
|
||||
memberDetails.add(MarkerComments.START_OF_ANNOTATION_TYPE_DETAILS);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -106,11 +106,11 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
public void addAnnotationDetailsTreeHeader(TypeElement te,
|
||||
Content memberDetailsTree) {
|
||||
if (!writer.printedAnnotationHeading) {
|
||||
memberDetailsTree.addContent(links.createAnchor(
|
||||
memberDetailsTree.add(links.createAnchor(
|
||||
SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.annotationTypeDetailsLabel);
|
||||
memberDetailsTree.addContent(heading);
|
||||
memberDetailsTree.add(heading);
|
||||
writer.printedAnnotationHeading = true;
|
||||
}
|
||||
}
|
||||
@ -121,12 +121,12 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree) {
|
||||
String simpleName = name(member);
|
||||
annotationDetailsTree.addContent(links.createAnchor(
|
||||
annotationDetailsTree.add(links.createAnchor(
|
||||
simpleName + utils.signature((ExecutableElement) member)));
|
||||
Content annotationDocTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(simpleName);
|
||||
annotationDocTree.addContent(heading);
|
||||
heading.add(simpleName);
|
||||
annotationDocTree.add(heading);
|
||||
return annotationDocTree;
|
||||
}
|
||||
|
||||
@ -140,8 +140,8 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
Content link =
|
||||
writer.getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.MEMBER, getType(member)));
|
||||
pre.addContent(link);
|
||||
pre.addContent(Contents.SPACE);
|
||||
pre.add(link);
|
||||
pre.add(Contents.SPACE);
|
||||
if (configuration.linksource) {
|
||||
Content memberName = new StringContent(name(member));
|
||||
writer.addSrcLink(member, memberName, pre);
|
||||
@ -193,7 +193,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.annotateTypeRequiredMemberSummaryLabel);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -230,7 +230,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(
|
||||
memberTree.add(links.createAnchor(
|
||||
SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY));
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
|
||||
writer.getDocLink(context, member, name(member), false));
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,36 +92,36 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
navBar.setNavLinkModule(linkContent);
|
||||
navBar.setMemberSummaryBuilder(configuration.getBuilderFactory().getMemberSummaryBuilder(this));
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
bodyTree.addContent(MarkerComments.START_OF_CLASS_DATA);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
bodyTree.add(MarkerComments.START_OF_CLASS_DATA);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.header);
|
||||
if (configuration.showModules) {
|
||||
ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(annotationType);
|
||||
Content typeModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInType, contents.moduleLabel);
|
||||
Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, typeModuleLabel);
|
||||
moduleNameDiv.addContent(Contents.SPACE);
|
||||
moduleNameDiv.addContent(getModuleLink(mdle, new StringContent(mdle.getQualifiedName())));
|
||||
div.addContent(moduleNameDiv);
|
||||
moduleNameDiv.add(Contents.SPACE);
|
||||
moduleNameDiv.add(getModuleLink(mdle, new StringContent(mdle.getQualifiedName())));
|
||||
div.add(moduleNameDiv);
|
||||
}
|
||||
PackageElement pkg = utils.containingPackage(annotationType);
|
||||
if (!pkg.isUnnamed()) {
|
||||
Content typePackageLabel = HtmlTree.SPAN(HtmlStyle.packageLabelInType, contents.packageLabel);
|
||||
Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, typePackageLabel);
|
||||
pkgNameDiv.addContent(Contents.SPACE);
|
||||
pkgNameDiv.add(Contents.SPACE);
|
||||
Content pkgNameContent = getPackageLink(pkg, new StringContent(utils.getPackageName(pkg)));
|
||||
pkgNameDiv.addContent(pkgNameContent);
|
||||
div.addContent(pkgNameDiv);
|
||||
pkgNameDiv.add(pkgNameContent);
|
||||
div.add(pkgNameDiv);
|
||||
}
|
||||
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_HEADER, annotationType);
|
||||
Content headerContent = new StringContent(header);
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, headerContent);
|
||||
heading.addContent(getTypeParameterLinks(linkInfo));
|
||||
div.addContent(heading);
|
||||
mainTree.addContent(div);
|
||||
heading.add(getTypeParameterLinks(linkInfo));
|
||||
div.add(heading);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -138,12 +138,12 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
*/
|
||||
@Override
|
||||
public void addFooter(Content contentTree) {
|
||||
contentTree.addContent(MarkerComments.END_OF_CLASS_DATA);
|
||||
contentTree.add(MarkerComments.END_OF_CLASS_DATA);
|
||||
Content htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
contentTree.addContent(htmlTree);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -180,23 +180,23 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
@Override
|
||||
public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree) {
|
||||
Content hr = new HtmlTree(HtmlTag.HR);
|
||||
annotationInfoTree.addContent(hr);
|
||||
annotationInfoTree.add(hr);
|
||||
Content pre = new HtmlTree(HtmlTag.PRE);
|
||||
addAnnotationInfo(annotationType, pre);
|
||||
pre.addContent(modifiers);
|
||||
pre.add(modifiers);
|
||||
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_SIGNATURE, annotationType);
|
||||
Content annotationName = new StringContent(utils.getSimpleName(annotationType));
|
||||
Content parameterLinks = getTypeParameterLinks(linkInfo);
|
||||
if (configuration.linksource) {
|
||||
addSrcLink(annotationType, annotationName, pre);
|
||||
pre.addContent(parameterLinks);
|
||||
pre.add(parameterLinks);
|
||||
} else {
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.memberNameLabel, annotationName);
|
||||
span.addContent(parameterLinks);
|
||||
pre.addContent(span);
|
||||
span.add(parameterLinks);
|
||||
pre.add(span);
|
||||
}
|
||||
annotationInfoTree.addContent(pre);
|
||||
annotationInfoTree.add(pre);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -238,7 +238,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
addInlineDeprecatedComment(annotationType, deprs.get(0), div);
|
||||
}
|
||||
}
|
||||
annotationInfoTree.addContent(div);
|
||||
annotationInfoTree.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,16 +229,16 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
if (pkgSet.size() > 0) {
|
||||
addClassUse(div);
|
||||
} else {
|
||||
div.addContent(contents.getContent("doclet.ClassUse_No.usage.of.0",
|
||||
div.add(contents.getContent("doclet.ClassUse_No.usage.of.0",
|
||||
utils.getFullyQualifiedName(typeElement)));
|
||||
}
|
||||
mainTree.addContent(div);
|
||||
body.addContent(mainTree);
|
||||
mainTree.add(div);
|
||||
body.add(mainTree);
|
||||
HtmlTree footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
body.addContent(footer);
|
||||
body.add(footer);
|
||||
String description = getDescription("use", typeElement);
|
||||
printHtmlDocument(null, description, body);
|
||||
}
|
||||
@ -256,7 +256,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
addPackageAnnotationList(ul);
|
||||
}
|
||||
addClassList(ul);
|
||||
contentTree.addContent(ul);
|
||||
contentTree.add(ul);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -277,7 +277,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
addPackageUse(pkg, table);
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
contentTree.addContent(li);
|
||||
contentTree.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -306,7 +306,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
table.addRow(getPackageLink(pkg), summary);
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
contentTree.addContent(li);
|
||||
contentTree.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -325,12 +325,12 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
typeElement)),
|
||||
getPackageLink(pkg, utils.getPackageName(pkg)));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeUse.SUMMARY_HEADING, link);
|
||||
htmlTree.addContent(heading);
|
||||
htmlTree.add(heading);
|
||||
addClassUse(pkg, htmlTree);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
|
||||
contentTree.addContent(li);
|
||||
contentTree.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -445,16 +445,16 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
.label(resources.getText("doclet.Class")));
|
||||
navBar.setNavLinkClass(classLinkContent);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
ContentBuilder headContent = new ContentBuilder();
|
||||
headContent.addContent(contents.getContent("doclet.ClassUse_Title", cltype));
|
||||
headContent.addContent(new HtmlTree(HtmlTag.BR));
|
||||
headContent.addContent(clname);
|
||||
headContent.add(contents.getContent("doclet.ClassUse_Title", cltype));
|
||||
headContent.add(new HtmlTree(HtmlTag.BR));
|
||||
headContent.add(clname);
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
|
||||
true, HtmlStyle.title, headContent);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
mainTree.addContent(div);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
}
|
||||
|
@ -113,29 +113,29 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
navBar.setNavLinkModule(linkContent);
|
||||
navBar.setMemberSummaryBuilder(configuration.getBuilderFactory().getMemberSummaryBuilder(this));
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
bodyTree.addContent(MarkerComments.START_OF_CLASS_DATA);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
bodyTree.add(MarkerComments.START_OF_CLASS_DATA);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.header);
|
||||
if (configuration.showModules) {
|
||||
ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(typeElement);
|
||||
Content classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInType, contents.moduleLabel);
|
||||
Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel);
|
||||
moduleNameDiv.addContent(Contents.SPACE);
|
||||
moduleNameDiv.addContent(getModuleLink(mdle,
|
||||
moduleNameDiv.add(Contents.SPACE);
|
||||
moduleNameDiv.add(getModuleLink(mdle,
|
||||
new StringContent(mdle.getQualifiedName())));
|
||||
div.addContent(moduleNameDiv);
|
||||
div.add(moduleNameDiv);
|
||||
}
|
||||
PackageElement pkg = utils.containingPackage(typeElement);
|
||||
if (!pkg.isUnnamed()) {
|
||||
Content classPackageLabel = HtmlTree.SPAN(HtmlStyle.packageLabelInType, contents.packageLabel);
|
||||
Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classPackageLabel);
|
||||
pkgNameDiv.addContent(Contents.SPACE);
|
||||
pkgNameDiv.add(Contents.SPACE);
|
||||
Content pkgNameContent = getPackageLink(pkg,
|
||||
new StringContent(utils.getPackageName(pkg)));
|
||||
pkgNameDiv.addContent(pkgNameContent);
|
||||
div.addContent(pkgNameDiv);
|
||||
pkgNameDiv.add(pkgNameContent);
|
||||
div.add(pkgNameDiv);
|
||||
}
|
||||
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_HEADER, typeElement);
|
||||
@ -144,9 +144,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content headerContent = new StringContent(header);
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, headerContent);
|
||||
heading.addContent(getTypeParameterLinks(linkInfo));
|
||||
div.addContent(heading);
|
||||
mainTree.addContent(div);
|
||||
heading.add(getTypeParameterLinks(linkInfo));
|
||||
div.add(heading);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -163,12 +163,12 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
*/
|
||||
@Override
|
||||
public void addFooter(Content contentTree) {
|
||||
contentTree.addContent(MarkerComments.END_OF_CLASS_DATA);
|
||||
contentTree.add(MarkerComments.END_OF_CLASS_DATA);
|
||||
Content htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
contentTree.addContent(htmlTree);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -205,10 +205,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
@Override
|
||||
public void addClassSignature(String modifiers, Content classInfoTree) {
|
||||
Content hr = new HtmlTree(HtmlTag.HR);
|
||||
classInfoTree.addContent(hr);
|
||||
classInfoTree.add(hr);
|
||||
Content pre = new HtmlTree(HtmlTag.PRE);
|
||||
addAnnotationInfo(typeElement, pre);
|
||||
pre.addContent(modifiers);
|
||||
pre.add(modifiers);
|
||||
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_SIGNATURE, typeElement);
|
||||
//Let's not link to ourselves in the signature.
|
||||
@ -217,21 +217,21 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content parameterLinks = getTypeParameterLinks(linkInfo);
|
||||
if (configuration.linksource) {
|
||||
addSrcLink(typeElement, className, pre);
|
||||
pre.addContent(parameterLinks);
|
||||
pre.add(parameterLinks);
|
||||
} else {
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.typeNameLabel, className);
|
||||
span.addContent(parameterLinks);
|
||||
pre.addContent(span);
|
||||
span.add(parameterLinks);
|
||||
pre.add(span);
|
||||
}
|
||||
if (!utils.isInterface(typeElement)) {
|
||||
TypeMirror superclass = utils.getFirstVisibleSuperClass(typeElement);
|
||||
if (superclass != null) {
|
||||
pre.addContent(DocletConstants.NL);
|
||||
pre.addContent("extends ");
|
||||
pre.add(DocletConstants.NL);
|
||||
pre.add("extends ");
|
||||
Content link = getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
|
||||
superclass));
|
||||
pre.addContent(link);
|
||||
pre.add(link);
|
||||
}
|
||||
}
|
||||
List<? extends TypeMirror> interfaces = typeElement.getInterfaces();
|
||||
@ -243,19 +243,19 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
continue;
|
||||
}
|
||||
if (isFirst) {
|
||||
pre.addContent(DocletConstants.NL);
|
||||
pre.addContent(utils.isInterface(typeElement) ? "extends " : "implements ");
|
||||
pre.add(DocletConstants.NL);
|
||||
pre.add(utils.isInterface(typeElement) ? "extends " : "implements ");
|
||||
isFirst = false;
|
||||
} else {
|
||||
pre.addContent(", ");
|
||||
pre.add(", ");
|
||||
}
|
||||
Content link = getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
|
||||
type));
|
||||
pre.addContent(link);
|
||||
pre.add(link);
|
||||
}
|
||||
}
|
||||
classInfoTree.addContent(pre);
|
||||
classInfoTree.add(pre);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -298,17 +298,17 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
if (sup != null) {
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
ul.setStyle(HtmlStyle.inheritance);
|
||||
ul.addContent(getTreeForClassHelper(type));
|
||||
ul.add(getTreeForClassHelper(type));
|
||||
if (liTree != null)
|
||||
ul.addContent(liTree);
|
||||
ul.add(liTree);
|
||||
Content li = HtmlTree.LI(ul);
|
||||
liTree = li;
|
||||
type = sup;
|
||||
} else
|
||||
classTreeUl.addContent(getTreeForClassHelper(type));
|
||||
classTreeUl.add(getTreeForClassHelper(type));
|
||||
} while (sup != null);
|
||||
if (liTree != null)
|
||||
classTreeUl.addContent(liTree);
|
||||
classTreeUl.add(liTree);
|
||||
return classTreeUl;
|
||||
}
|
||||
|
||||
@ -325,17 +325,17 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
new LinkInfoImpl(configuration, LinkInfoImpl.Kind.TREE,
|
||||
typeElement));
|
||||
if (configuration.shouldExcludeQualifier(utils.containingPackage(typeElement).toString())) {
|
||||
li.addContent(utils.asTypeElement(type).getSimpleName());
|
||||
li.addContent(typeParameters);
|
||||
li.add(utils.asTypeElement(type).getSimpleName());
|
||||
li.add(typeParameters);
|
||||
} else {
|
||||
li.addContent(utils.asTypeElement(type).getQualifiedName());
|
||||
li.addContent(typeParameters);
|
||||
li.add(utils.asTypeElement(type).getQualifiedName());
|
||||
li.add(typeParameters);
|
||||
}
|
||||
} else {
|
||||
Content link = getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS_TREE_PARENT, type)
|
||||
.label(configuration.getClassName(utils.asTypeElement(type))));
|
||||
li.addContent(link);
|
||||
li.add(link);
|
||||
}
|
||||
return li;
|
||||
}
|
||||
@ -348,7 +348,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
if (!utils.isClass(typeElement)) {
|
||||
return;
|
||||
}
|
||||
classContentTree.addContent(getClassInheritenceTree(typeElement.asType()));
|
||||
classContentTree.add(getClassInheritenceTree(typeElement.asType()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -360,7 +360,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content typeParam = (new ParamTaglet()).getTagletOutput(typeElement,
|
||||
getTagletWriterInstance(false));
|
||||
Content dl = HtmlTree.DL(typeParam);
|
||||
classInfoTree.addContent(dl);
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,9 +380,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content label = contents.subclassesLabel;
|
||||
Content dt = HtmlTree.DT(label);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES,
|
||||
dl.add(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES,
|
||||
subclasses));
|
||||
classInfoTree.addContent(dl);
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -398,9 +398,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content label = contents.subinterfacesLabel;
|
||||
Content dt = HtmlTree.DT(label);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES,
|
||||
dl.add(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES,
|
||||
subInterfaces));
|
||||
classInfoTree.addContent(dl);
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -423,9 +423,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content label = contents.implementingClassesLabel;
|
||||
Content dt = HtmlTree.DT(label);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES,
|
||||
dl.add(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES,
|
||||
implcl));
|
||||
classInfoTree.addContent(dl);
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -440,8 +440,8 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content label = contents.allImplementedInterfacesLabel;
|
||||
Content dt = HtmlTree.DT(label);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, interfaces));
|
||||
classInfoTree.addContent(dl);
|
||||
dl.add(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, interfaces));
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -458,8 +458,8 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content label = contents.allSuperinterfacesLabel;
|
||||
Content dt = HtmlTree.DT(label);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, interfaces));
|
||||
classInfoTree.addContent(dl);
|
||||
dl.add(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, interfaces));
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -480,10 +480,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content dt = HtmlTree.DT(label);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
dd.addContent(getLink(new LinkInfoImpl(configuration,
|
||||
dd.add(getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CLASS, e)));
|
||||
dl.addContent(dd);
|
||||
classInfoTree.addContent(dl);
|
||||
dl.add(dd);
|
||||
classInfoTree.add(dl);
|
||||
return null;
|
||||
}
|
||||
}.visit(outerClass);
|
||||
@ -498,9 +498,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
Content dt = HtmlTree.DT(contents.functionalInterface);
|
||||
Content dl = HtmlTree.DL(dt);
|
||||
Content dd = new HtmlTree(HtmlTag.DD);
|
||||
dd.addContent(contents.functionalInterfaceMessage);
|
||||
dl.addContent(dd);
|
||||
classInfoTree.addContent(dl);
|
||||
dd.add(contents.functionalInterfaceMessage);
|
||||
dl.add(dd);
|
||||
classInfoTree.add(dl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
addInlineDeprecatedComment(typeElement, deprs.get(0), div);
|
||||
}
|
||||
}
|
||||
classInfoTree.addContent(div);
|
||||
classInfoTree.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
@ -549,7 +549,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
for (Object type : list) {
|
||||
if (!isFirst) {
|
||||
Content separator = new StringContent(", ");
|
||||
dd.addContent(separator);
|
||||
dd.add(separator);
|
||||
} else {
|
||||
isFirst = false;
|
||||
}
|
||||
@ -557,11 +557,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
if (type instanceof TypeElement) {
|
||||
Content link = getLink(
|
||||
new LinkInfoImpl(configuration, context, (TypeElement)(type)));
|
||||
dd.addContent(HtmlTree.CODE(link));
|
||||
dd.add(HtmlTree.CODE(link));
|
||||
} else {
|
||||
Content link = getLink(
|
||||
new LinkInfoImpl(configuration, context, ((TypeMirror)type)));
|
||||
dd.addContent(HtmlTree.CODE(link));
|
||||
dd.add(HtmlTree.CODE(link));
|
||||
}
|
||||
}
|
||||
return dd;
|
||||
|
@ -109,8 +109,8 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
HtmlTree htmlTree = HtmlTree.HEADER();
|
||||
addTop(htmlTree);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -136,13 +136,13 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
} else {
|
||||
String parsedPackageName = utils.parsePackageName(pkg);
|
||||
Content packageNameContent = getPackageLabel(parsedPackageName);
|
||||
packageNameContent.addContent(".*");
|
||||
packageNameContent.add(".*");
|
||||
link = links.createLink(DocLink.fragment(parsedPackageName),
|
||||
packageNameContent, "", "");
|
||||
PackageElement abbrevPkg = configuration.workArounds.getAbbreviatedPackageElement(pkg);
|
||||
printedPackageHeaders.add(abbrevPkg);
|
||||
}
|
||||
contentListTree.addContent(HtmlTree.LI(link));
|
||||
contentListTree.add(HtmlTree.LI(link));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,9 +158,9 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, true,
|
||||
headingContent);
|
||||
HtmlTree section = HtmlTree.SECTION(heading);
|
||||
section.addContent(contentListTree);
|
||||
div.addContent(section);
|
||||
mainTree.addContent(div);
|
||||
section.add(contentListTree);
|
||||
div.add(section);
|
||||
mainTree.add(div);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -180,20 +180,20 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
public void addPackageName(PackageElement pkg, Content summariesTree, boolean first) {
|
||||
Content pkgNameContent;
|
||||
if (!first) {
|
||||
summariesTree.addContent(summaryTree);
|
||||
summariesTree.add(summaryTree);
|
||||
}
|
||||
if (pkg.isUnnamed()) {
|
||||
summariesTree.addContent(links.createAnchor(SectionName.UNNAMED_PACKAGE_ANCHOR));
|
||||
summariesTree.add(links.createAnchor(SectionName.UNNAMED_PACKAGE_ANCHOR));
|
||||
pkgNameContent = contents.defaultPackageLabel;
|
||||
} else {
|
||||
String parsedPackageName = utils.parsePackageName(pkg);
|
||||
summariesTree.addContent(links.createAnchor(parsedPackageName));
|
||||
summariesTree.add(links.createAnchor(parsedPackageName));
|
||||
pkgNameContent = getPackageLabel(parsedPackageName);
|
||||
}
|
||||
Content headingContent = new StringContent(".*");
|
||||
Content heading = HtmlTree.HEADING(Headings.ConstantsSummary.PACKAGE_HEADING, true,
|
||||
pkgNameContent);
|
||||
heading.addContent(headingContent);
|
||||
heading.add(headingContent);
|
||||
summaryTree = HtmlTree.SECTION(heading);
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
*/
|
||||
@Override
|
||||
public void addClassConstant(Content summariesTree, Content classConstantTree) {
|
||||
summaryTree.addContent(classConstantTree);
|
||||
summaryTree.add(classConstantTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -232,10 +232,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
PackageElement enclosingPackage = utils.containingPackage(typeElement);
|
||||
Content caption = new ContentBuilder();
|
||||
if (!enclosingPackage.isUnnamed()) {
|
||||
caption.addContent(enclosingPackage.getQualifiedName());
|
||||
caption.addContent(".");
|
||||
caption.add(enclosingPackage.getQualifiedName());
|
||||
caption.add(".");
|
||||
}
|
||||
caption.addContent(classlink);
|
||||
caption.add(classlink);
|
||||
|
||||
Table table = new Table(HtmlStyle.constantsSummary)
|
||||
.setCaption(caption)
|
||||
@ -247,7 +247,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
table.addRow(getTypeColumn(field), getNameColumn(field), getValue(field));
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
classConstantTree.addContent(li);
|
||||
classConstantTree.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -260,17 +260,17 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
Content anchor = links.createAnchor(
|
||||
currentTypeElement.getQualifiedName() + "." + member.getSimpleName());
|
||||
Content typeContent = new ContentBuilder();
|
||||
typeContent.addContent(anchor);
|
||||
typeContent.add(anchor);
|
||||
Content code = new HtmlTree(HtmlTag.CODE);
|
||||
for (Modifier mod : member.getModifiers()) {
|
||||
Content modifier = new StringContent(mod.toString());
|
||||
code.addContent(modifier);
|
||||
code.addContent(Contents.SPACE);
|
||||
code.add(modifier);
|
||||
code.add(Contents.SPACE);
|
||||
}
|
||||
Content type = getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.CONSTANT_SUMMARY, member.asType()));
|
||||
code.addContent(type);
|
||||
typeContent.addContent(code);
|
||||
code.add(type);
|
||||
typeContent.add(code);
|
||||
return typeContent;
|
||||
}
|
||||
|
||||
@ -304,10 +304,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
@Override
|
||||
public void addConstantSummaries(Content contentTree, Content summariesTree) {
|
||||
if (summaryTree != null) {
|
||||
summariesTree.addContent(summaryTree);
|
||||
summariesTree.add(summaryTree);
|
||||
}
|
||||
mainTree.addContent(summariesTree);
|
||||
contentTree.addContent(mainTree);
|
||||
mainTree.add(summariesTree);
|
||||
contentTree.add(mainTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -317,9 +317,9 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
|
||||
public void addFooter(Content contentTree) {
|
||||
Content htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
contentTree.addContent(htmlTree);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -97,7 +97,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(MarkerComments.START_OF_CONSTRUCTOR_SUMMARY);
|
||||
memberSummaryTree.add(MarkerComments.START_OF_CONSTRUCTOR_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
return memberTree;
|
||||
@ -117,13 +117,13 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
@Override
|
||||
public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
|
||||
Content memberDetailsTree) {
|
||||
memberDetailsTree.addContent(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
|
||||
memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
|
||||
Content constructorDetailsTree = writer.getMemberTreeHeader();
|
||||
constructorDetailsTree.addContent(links.createAnchor(
|
||||
constructorDetailsTree.add(links.createAnchor(
|
||||
SectionName.CONSTRUCTOR_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.constructorDetailsLabel);
|
||||
constructorDetailsTree.addContent(heading);
|
||||
constructorDetailsTree.add(heading);
|
||||
return constructorDetailsTree;
|
||||
}
|
||||
|
||||
@ -135,13 +135,13 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
Content constructorDetailsTree) {
|
||||
String erasureAnchor;
|
||||
if ((erasureAnchor = getErasureAnchor(constructor)) != null) {
|
||||
constructorDetailsTree.addContent(links.createAnchor((erasureAnchor)));
|
||||
constructorDetailsTree.add(links.createAnchor((erasureAnchor)));
|
||||
}
|
||||
constructorDetailsTree.addContent(links.createAnchor(writer.getAnchor(constructor)));
|
||||
constructorDetailsTree.add(links.createAnchor(writer.getAnchor(constructor)));
|
||||
Content constructorDocTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(name(constructor));
|
||||
constructorDocTree.addContent(heading);
|
||||
heading.add(name(constructor));
|
||||
constructorDocTree.add(heading);
|
||||
return constructorDocTree;
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.constructorSummaryLabel);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -266,7 +266,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(SectionName.CONSTRUCTOR_SUMMARY));
|
||||
memberTree.add(links.createAnchor(SectionName.CONSTRUCTOR_SUMMARY));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -291,16 +291,16 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
if (foundNonPubConstructor) {
|
||||
Content code = new HtmlTree(HtmlTag.CODE);
|
||||
if (utils.isProtected(member)) {
|
||||
code.addContent("protected ");
|
||||
code.add("protected ");
|
||||
} else if (utils.isPrivate(member)) {
|
||||
code.addContent("private ");
|
||||
code.add("private ");
|
||||
} else if (utils.isPublic(member)) {
|
||||
code.addContent(Contents.SPACE);
|
||||
code.add(Contents.SPACE);
|
||||
} else {
|
||||
code.addContent(
|
||||
code.add(
|
||||
resources.getText("doclet.Package_private"));
|
||||
}
|
||||
tdSummaryType.addContent(code);
|
||||
tdSummaryType.add(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -360,7 +360,7 @@ public class Contents {
|
||||
Matcher m = p.matcher(text);
|
||||
int start = 0;
|
||||
while (m.find(start)) {
|
||||
c.addContent(text.substring(start, m.start()));
|
||||
c.add(text.substring(start, m.start()));
|
||||
|
||||
Object o = null;
|
||||
switch (m.group(1).charAt(0)) {
|
||||
@ -370,17 +370,17 @@ public class Contents {
|
||||
}
|
||||
|
||||
if (o == null) {
|
||||
c.addContent("{" + m.group(1) + "}");
|
||||
c.add("{" + m.group(1) + "}");
|
||||
} else if (o instanceof String) {
|
||||
c.addContent((String) o);
|
||||
c.add((String) o);
|
||||
} else if (o instanceof Content) {
|
||||
c.addContent((Content) o);
|
||||
c.add((Content) o);
|
||||
}
|
||||
|
||||
start = m.end();
|
||||
}
|
||||
|
||||
c.addContent(text.substring(start));
|
||||
c.add(text.substring(start));
|
||||
return c;
|
||||
}
|
||||
|
||||
@ -399,11 +399,11 @@ public class Contents {
|
||||
int start = 0;
|
||||
int p;
|
||||
while ((p = text.indexOf(" ", start)) != -1) {
|
||||
c.addContent(text.substring(start, p));
|
||||
c.addContent(RawHtml.nbsp);
|
||||
c.add(text.substring(start, p));
|
||||
c.add(RawHtml.nbsp);
|
||||
start = p + 1;
|
||||
}
|
||||
c.addContent(text.substring(start));
|
||||
c.add(text.substring(start));
|
||||
return c; // TODO: should be made immutable
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
throws DocFileIOException {
|
||||
HtmlTree body = getHeader();
|
||||
HtmlTree htmlTree = HtmlTree.MAIN();
|
||||
htmlTree.addContent(getContentsList(deprapi));
|
||||
htmlTree.add(getContentsList(deprapi));
|
||||
String memberTableSummary;
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.contentContainer);
|
||||
@ -300,13 +300,13 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
getHeadingKey(kind), memberTableSummary, memberTableHeader, div);
|
||||
}
|
||||
}
|
||||
htmlTree.addContent(div);
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(div);
|
||||
body.add(htmlTree);
|
||||
htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
body.addContent(htmlTree);
|
||||
body.add(htmlTree);
|
||||
String description = "deprecated elements";
|
||||
printHtmlDocument(null, description, body);
|
||||
}
|
||||
@ -323,7 +323,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
if (builder.hasDocumentation(kind)) {
|
||||
Content li = HtmlTree.LI(links.createLink(getAnchorName(kind),
|
||||
contents.getContent(getHeadingKey(kind))));
|
||||
contentTree.addContent(li);
|
||||
contentTree.add(li);
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,13 +339,13 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
HtmlStyle.title, headContent);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
Content headingContent = contents.contentsHeading;
|
||||
div.addContent(HtmlTree.HEADING(Headings.CONTENT_HEADING, true,
|
||||
div.add(HtmlTree.HEADING(Headings.CONTENT_HEADING, true,
|
||||
headingContent));
|
||||
Content ul = new HtmlTree(HtmlTag.UL);
|
||||
for (DeprElementKind kind : DeprElementKind.values()) {
|
||||
addIndexLink(deprapi, kind, ul);
|
||||
}
|
||||
div.addContent(ul);
|
||||
div.add(ul);
|
||||
return div;
|
||||
}
|
||||
|
||||
@ -358,7 +358,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
*/
|
||||
private void addAnchor(DeprecatedAPIListBuilder builder, DeprElementKind kind, Content htmlTree) {
|
||||
if (builder.hasDocumentation(kind)) {
|
||||
htmlTree.addContent(links.createAnchor(getAnchorName(kind)));
|
||||
htmlTree.add(links.createAnchor(getAnchorName(kind)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,8 +373,8 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
HtmlTree htmlTree = HtmlTree.HEADER();
|
||||
addTop(htmlTree);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -414,13 +414,13 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
if (!tags.isEmpty()) {
|
||||
addInlineDeprecatedComment(e, tags.get(0), desc);
|
||||
} else {
|
||||
desc.addContent(HtmlTree.EMPTY);
|
||||
desc.add(HtmlTree.EMPTY);
|
||||
}
|
||||
table.addRow(link, desc);
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
|
||||
contentTree.addContent(ul);
|
||||
contentTree.add(ul);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,21 +191,21 @@ public class DocFilesHandlerImpl implements DocFilesHandler {
|
||||
navBar.setNavLinkPackage(pkgLinkContent);
|
||||
navBar.setUserHeader(docletWriter.getUserHeaderFooter(true));
|
||||
Content header = HtmlTree.HEADER();
|
||||
header.addContent(navBar.getContent(true));
|
||||
htmlContent.addContent(header);
|
||||
header.add(navBar.getContent(true));
|
||||
htmlContent.add(header);
|
||||
|
||||
List<? extends DocTree> fullBody = utils.getFullBody(dfElement);
|
||||
Content bodyContent = docletWriter.commentTagsToContent(null, dfElement, fullBody, false);
|
||||
docletWriter.addTagsInfo(dfElement, bodyContent);
|
||||
Content main = HtmlTree.MAIN();
|
||||
main.addContent(bodyContent);
|
||||
htmlContent.addContent(main);
|
||||
main.add(bodyContent);
|
||||
htmlContent.add(main);
|
||||
|
||||
navBar.setUserFooter(docletWriter.getUserHeaderFooter(false));
|
||||
Content footer = HtmlTree.FOOTER();
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
docletWriter.addBottom(footer);
|
||||
htmlContent.addContent(footer);
|
||||
htmlContent.add(footer);
|
||||
docletWriter.printHtmlDocument(Collections.emptyList(), null, localTagsContent, htmlContent);
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(MarkerComments.START_OF_ENUM_CONSTANT_SUMMARY);
|
||||
memberSummaryTree.add(MarkerComments.START_OF_ENUM_CONSTANT_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
return memberTree;
|
||||
@ -89,13 +89,13 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getEnumConstantsDetailsTreeHeader(TypeElement typeElement,
|
||||
Content memberDetailsTree) {
|
||||
memberDetailsTree.addContent(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS);
|
||||
memberDetailsTree.add(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS);
|
||||
Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
|
||||
enumConstantsDetailsTree.addContent(links.createAnchor(
|
||||
enumConstantsDetailsTree.add(links.createAnchor(
|
||||
SectionName.ENUM_CONSTANT_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.enumConstantDetailLabel);
|
||||
enumConstantsDetailsTree.addContent(heading);
|
||||
enumConstantsDetailsTree.add(heading);
|
||||
return enumConstantsDetailsTree;
|
||||
}
|
||||
|
||||
@ -105,11 +105,11 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getEnumConstantsTreeHeader(VariableElement enumConstant,
|
||||
Content enumConstantsDetailsTree) {
|
||||
enumConstantsDetailsTree.addContent(links.createAnchor(name(enumConstant)));
|
||||
enumConstantsDetailsTree.add(links.createAnchor(name(enumConstant)));
|
||||
Content enumConstantsTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(name(enumConstant));
|
||||
enumConstantsTree.addContent(heading);
|
||||
heading.add(name(enumConstant));
|
||||
enumConstantsTree.add(heading);
|
||||
return enumConstantsTree;
|
||||
}
|
||||
|
||||
@ -123,8 +123,8 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
addModifiers(enumConstant, pre);
|
||||
Content enumConstantLink = writer.getLink(new LinkInfoImpl(
|
||||
configuration, LinkInfoImpl.Kind.MEMBER, enumConstant.asType()));
|
||||
pre.addContent(enumConstantLink);
|
||||
pre.addContent(" ");
|
||||
pre.add(enumConstantLink);
|
||||
pre.add(" ");
|
||||
if (configuration.linksource) {
|
||||
Content enumConstantName = new StringContent(name(enumConstant));
|
||||
writer.addSrcLink(enumConstant, enumConstantName, pre);
|
||||
@ -182,7 +182,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.enumConstantSummary);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -209,7 +209,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(SectionName.ENUM_CONSTANT_SUMMARY));
|
||||
memberTree.add(links.createAnchor(SectionName.ENUM_CONSTANT_SUMMARY));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -235,7 +235,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
|
||||
writer.getDocLink(context, member, name(member), false));
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(MarkerComments.START_OF_FIELD_SUMMARY);
|
||||
memberSummaryTree.add(MarkerComments.START_OF_FIELD_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
return memberTree;
|
||||
@ -92,13 +92,13 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public Content getFieldDetailsTreeHeader(TypeElement typeElement, Content memberDetailsTree) {
|
||||
memberDetailsTree.addContent(MarkerComments.START_OF_FIELD_DETAILS);
|
||||
memberDetailsTree.add(MarkerComments.START_OF_FIELD_DETAILS);
|
||||
Content fieldDetailsTree = writer.getMemberTreeHeader();
|
||||
fieldDetailsTree.addContent(links.createAnchor(
|
||||
fieldDetailsTree.add(links.createAnchor(
|
||||
SectionName.FIELD_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.fieldDetailsLabel);
|
||||
fieldDetailsTree.addContent(heading);
|
||||
fieldDetailsTree.add(heading);
|
||||
return fieldDetailsTree;
|
||||
}
|
||||
|
||||
@ -107,11 +107,11 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public Content getFieldDocTreeHeader(VariableElement field, Content fieldDetailsTree) {
|
||||
fieldDetailsTree.addContent(links.createAnchor(name(field)));
|
||||
fieldDetailsTree.add(links.createAnchor(name(field)));
|
||||
Content fieldTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(name(field));
|
||||
fieldTree.addContent(heading);
|
||||
heading.add(name(field));
|
||||
fieldTree.add(heading);
|
||||
return fieldTree;
|
||||
}
|
||||
|
||||
@ -125,8 +125,8 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
addModifiers(field, pre);
|
||||
Content fieldlink = writer.getLink(new LinkInfoImpl(
|
||||
configuration, LinkInfoImpl.Kind.MEMBER, field.asType()));
|
||||
pre.addContent(fieldlink);
|
||||
pre.addContent(" ");
|
||||
pre.add(fieldlink);
|
||||
pre.add(" ");
|
||||
if (configuration.linksource) {
|
||||
Content fieldName = new StringContent(name(field));
|
||||
writer.addSrcLink(field, fieldName, pre);
|
||||
@ -186,7 +186,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.fieldSummaryLabel);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -215,7 +215,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(
|
||||
memberTree.add(links.createAnchor(
|
||||
SectionName.FIELD_SUMMARY));
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
|
||||
inheritedTree.addContent(links.createAnchor(
|
||||
inheritedTree.add(links.createAnchor(
|
||||
SectionName.FIELDS_INHERITANCE, configuration.getClassName(typeElement)));
|
||||
}
|
||||
|
||||
@ -247,9 +247,9 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
}
|
||||
Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING,
|
||||
label);
|
||||
labelHeading.addContent(Contents.SPACE);
|
||||
labelHeading.addContent(classLink);
|
||||
inheritedTree.addContent(labelHeading);
|
||||
labelHeading.add(Contents.SPACE);
|
||||
labelHeading.add(classLink);
|
||||
inheritedTree.add(labelHeading);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +261,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
|
||||
writer.getDocLink(context, typeElement , member, name(member), false));
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -269,7 +269,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
|
||||
linksTree.addContent(
|
||||
linksTree.add(
|
||||
writer.getDocLink(LinkInfoImpl.Kind.MEMBER, typeElement, member,
|
||||
name(member), false));
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
package jdk.javadoc.internal.doclets.formats.html;
|
||||
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.Head;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.DocType;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
|
||||
@ -96,19 +95,19 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
protected void generateFrameFile() throws DocFileIOException {
|
||||
Content frame = getFrameDetails();
|
||||
HtmlTree body = new HtmlTree(HtmlTag.BODY);
|
||||
body.addAttr(HtmlAttr.CLASS, "frames");
|
||||
body.addAttr(HtmlAttr.ONLOAD, "loadFrames()");
|
||||
body.put(HtmlAttr.CLASS, "frames");
|
||||
body.put(HtmlAttr.ONLOAD, "loadFrames()");
|
||||
String topFilePath = configuration.topFile.getPath();
|
||||
Script script = new Script(
|
||||
"\nif (targetPage == \"\" || targetPage == \"undefined\")\n" +
|
||||
" window.location.replace(")
|
||||
.appendStringLiteral(topFilePath, '\'')
|
||||
.append(");\n");
|
||||
body.addContent(script.asContent());
|
||||
body.add(script.asContent());
|
||||
Content noScript = HtmlTree.NOSCRIPT(contents.noScriptMessage);
|
||||
body.addContent(noScript);
|
||||
body.add(noScript);
|
||||
HtmlTree main = HtmlTree.MAIN(frame);
|
||||
body.addContent(main);
|
||||
body.add(main);
|
||||
if (configuration.windowtitle.length() > 0) {
|
||||
printFramesDocument(configuration.windowtitle, body);
|
||||
} else {
|
||||
@ -159,7 +158,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
addAllClassesFrameTag(leftContainerDiv);
|
||||
addClassFrameTag(rightContainerDiv);
|
||||
HtmlTree mainContainer = HtmlTree.DIV(HtmlStyle.mainContainer, leftContainerDiv);
|
||||
mainContainer.addContent(rightContainerDiv);
|
||||
mainContainer.add(rightContainerDiv);
|
||||
return mainContainer;
|
||||
}
|
||||
|
||||
@ -172,7 +171,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
HtmlTree frame = HtmlTree.IFRAME(DocPaths.MODULE_OVERVIEW_FRAME.getPath(),
|
||||
"packageListFrame", resources.getText("doclet.All_Modules"));
|
||||
HtmlTree leftTop = HtmlTree.DIV(HtmlStyle.leftTop, frame);
|
||||
contentTree.addContent(leftTop);
|
||||
contentTree.add(leftTop);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,7 +183,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
HtmlTree frame = HtmlTree.IFRAME(DocPaths.OVERVIEW_FRAME.getPath(),
|
||||
"packageListFrame", resources.getText("doclet.All_Packages"));
|
||||
HtmlTree leftTop = HtmlTree.DIV(HtmlStyle.leftTop, frame);
|
||||
contentTree.addContent(leftTop);
|
||||
contentTree.add(leftTop);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -196,7 +195,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
HtmlTree frame = HtmlTree.IFRAME(DocPaths.ALLCLASSES_FRAME.getPath(),
|
||||
"packageFrame", resources.getText("doclet.All_classes_and_interfaces"));
|
||||
HtmlTree leftBottom = HtmlTree.DIV(HtmlStyle.leftBottom, frame);
|
||||
contentTree.addContent(leftBottom);
|
||||
contentTree.add(leftBottom);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -208,7 +207,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
HtmlTree frame = HtmlTree.IFRAME(configuration.topFile.getPath(), "classFrame",
|
||||
resources.getText("doclet.Package_class_and_interface_descriptions"));
|
||||
frame.setStyle(HtmlStyle.rightIframe);
|
||||
contentTree.addContent(frame);
|
||||
contentTree.add(frame);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -91,14 +91,14 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
HtmlTree htmlTree = HtmlTree.HEADER();
|
||||
addTop(htmlTree);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
body.add(htmlTree);
|
||||
addHelpFileContents(body);
|
||||
htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
body.addContent(htmlTree);
|
||||
body.add(htmlTree);
|
||||
printHtmlDocument(null, "help", body);
|
||||
}
|
||||
|
||||
@ -117,8 +117,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
Content intro = HtmlTree.DIV(HtmlStyle.subTitle,
|
||||
contents.getContent("doclet.help.intro"));
|
||||
div.addContent(intro);
|
||||
mainTree.addContent(div);
|
||||
div.add(intro);
|
||||
mainTree.add(div);
|
||||
HtmlTree htmlTree;
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
ul.setStyle(HtmlStyle.blockList);
|
||||
@ -136,8 +136,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
resources.getText("doclet.Overview"));
|
||||
Content overviewBody = contents.getContent(overviewKey, overviewLink);
|
||||
Content overviewPara = HtmlTree.P(overviewBody);
|
||||
htmlTree.addContent(overviewPara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(overviewPara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Module
|
||||
@ -147,13 +147,13 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(moduleHead);
|
||||
Content moduleIntro = contents.getContent("doclet.help.module.intro");
|
||||
Content modulePara = HtmlTree.P(moduleIntro);
|
||||
htmlTree.addContent(modulePara);
|
||||
htmlTree.add(modulePara);
|
||||
HtmlTree ulModule = new HtmlTree(HtmlTag.UL);
|
||||
ulModule.addContent(HtmlTree.LI(contents.packagesLabel));
|
||||
ulModule.addContent(HtmlTree.LI(contents.modulesLabel));
|
||||
ulModule.addContent(HtmlTree.LI(contents.servicesLabel));
|
||||
htmlTree.addContent(ulModule);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
ulModule.add(HtmlTree.LI(contents.packagesLabel));
|
||||
ulModule.add(HtmlTree.LI(contents.modulesLabel));
|
||||
ulModule.add(HtmlTree.LI(contents.servicesLabel));
|
||||
htmlTree.add(ulModule);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Package
|
||||
@ -162,16 +162,16 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(packageHead);
|
||||
Content packageIntro = contents.getContent("doclet.help.package.intro");
|
||||
Content packagePara = HtmlTree.P(packageIntro);
|
||||
htmlTree.addContent(packagePara);
|
||||
htmlTree.add(packagePara);
|
||||
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
|
||||
ulPackage.addContent(HtmlTree.LI(contents.interfaces));
|
||||
ulPackage.addContent(HtmlTree.LI(contents.classes));
|
||||
ulPackage.addContent(HtmlTree.LI(contents.enums));
|
||||
ulPackage.addContent(HtmlTree.LI(contents.exceptions));
|
||||
ulPackage.addContent(HtmlTree.LI(contents.errors));
|
||||
ulPackage.addContent(HtmlTree.LI(contents.annotationTypes));
|
||||
htmlTree.addContent(ulPackage);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
ulPackage.add(HtmlTree.LI(contents.interfaces));
|
||||
ulPackage.add(HtmlTree.LI(contents.classes));
|
||||
ulPackage.add(HtmlTree.LI(contents.enums));
|
||||
ulPackage.add(HtmlTree.LI(contents.exceptions));
|
||||
ulPackage.add(HtmlTree.LI(contents.errors));
|
||||
ulPackage.add(HtmlTree.LI(contents.annotationTypes));
|
||||
htmlTree.add(ulPackage);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
// Class/interface
|
||||
Content classHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
|
||||
@ -179,34 +179,34 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(classHead);
|
||||
Content classIntro = contents.getContent("doclet.help.class_interface.intro");
|
||||
Content classPara = HtmlTree.P(classIntro);
|
||||
htmlTree.addContent(classPara);
|
||||
htmlTree.add(classPara);
|
||||
HtmlTree ul1 = new HtmlTree(HtmlTag.UL);
|
||||
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.inheritance_diagram")));
|
||||
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subclasses")));
|
||||
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subinterfaces")));
|
||||
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.implementations")));
|
||||
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.declaration")));
|
||||
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.description")));
|
||||
htmlTree.addContent(ul1);
|
||||
htmlTree.addContent(new HtmlTree(HtmlTag.BR));
|
||||
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.inheritance_diagram")));
|
||||
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subclasses")));
|
||||
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subinterfaces")));
|
||||
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.implementations")));
|
||||
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.declaration")));
|
||||
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.description")));
|
||||
htmlTree.add(ul1);
|
||||
htmlTree.add(new HtmlTree(HtmlTag.BR));
|
||||
HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
|
||||
ul2.addContent(HtmlTree.LI(contents.nestedClassSummary));
|
||||
ul2.addContent(HtmlTree.LI(contents.fieldSummaryLabel));
|
||||
ul2.addContent(HtmlTree.LI(contents.propertySummaryLabel));
|
||||
ul2.addContent(HtmlTree.LI(contents.constructorSummaryLabel));
|
||||
ul2.addContent(HtmlTree.LI(contents.methodSummary));
|
||||
htmlTree.addContent(ul2);
|
||||
htmlTree.addContent(new HtmlTree(HtmlTag.BR));
|
||||
ul2.add(HtmlTree.LI(contents.nestedClassSummary));
|
||||
ul2.add(HtmlTree.LI(contents.fieldSummaryLabel));
|
||||
ul2.add(HtmlTree.LI(contents.propertySummaryLabel));
|
||||
ul2.add(HtmlTree.LI(contents.constructorSummaryLabel));
|
||||
ul2.add(HtmlTree.LI(contents.methodSummary));
|
||||
htmlTree.add(ul2);
|
||||
htmlTree.add(new HtmlTree(HtmlTag.BR));
|
||||
HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
|
||||
ul3.addContent(HtmlTree.LI(contents.fieldDetailsLabel));
|
||||
ul3.addContent(HtmlTree.LI(contents.propertyDetailsLabel));
|
||||
ul3.addContent(HtmlTree.LI(contents.constructorDetailsLabel));
|
||||
ul3.addContent(HtmlTree.LI(contents.methodDetailLabel));
|
||||
htmlTree.addContent(ul3);
|
||||
ul3.add(HtmlTree.LI(contents.fieldDetailsLabel));
|
||||
ul3.add(HtmlTree.LI(contents.propertyDetailsLabel));
|
||||
ul3.add(HtmlTree.LI(contents.constructorDetailsLabel));
|
||||
ul3.add(HtmlTree.LI(contents.methodDetailLabel));
|
||||
htmlTree.add(ul3);
|
||||
Content classSummary = contents.getContent("doclet.help.class_interface.summary");
|
||||
Content para = HtmlTree.P(classSummary);
|
||||
htmlTree.addContent(para);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(para);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
// Annotation Types
|
||||
Content aHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
|
||||
@ -214,29 +214,29 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(aHead);
|
||||
Content aIntro = contents.getContent("doclet.help.annotation_type.intro");
|
||||
Content aPara = HtmlTree.P(aIntro);
|
||||
htmlTree.addContent(aPara);
|
||||
htmlTree.add(aPara);
|
||||
HtmlTree aul = new HtmlTree(HtmlTag.UL);
|
||||
aul.addContent(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.declaration")));
|
||||
aul.addContent(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.description")));
|
||||
aul.addContent(HtmlTree.LI(contents.annotateTypeRequiredMemberSummaryLabel));
|
||||
aul.addContent(HtmlTree.LI(contents.annotateTypeOptionalMemberSummaryLabel));
|
||||
aul.addContent(HtmlTree.LI(contents.annotationTypeMemberDetail));
|
||||
htmlTree.addContent(aul);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
aul.add(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.declaration")));
|
||||
aul.add(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.description")));
|
||||
aul.add(HtmlTree.LI(contents.annotateTypeRequiredMemberSummaryLabel));
|
||||
aul.add(HtmlTree.LI(contents.annotateTypeOptionalMemberSummaryLabel));
|
||||
aul.add(HtmlTree.LI(contents.annotationTypeMemberDetail));
|
||||
htmlTree.add(aul);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
// Enums
|
||||
Content enumHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, contents.enum_);
|
||||
htmlTree = HtmlTree.SECTION(enumHead);
|
||||
Content eIntro = contents.getContent("doclet.help.enum.intro");
|
||||
Content enumPara = HtmlTree.P(eIntro);
|
||||
htmlTree.addContent(enumPara);
|
||||
htmlTree.add(enumPara);
|
||||
HtmlTree eul = new HtmlTree(HtmlTag.UL);
|
||||
eul.addContent(HtmlTree.LI(contents.getContent("doclet.help.enum.declaration")));
|
||||
eul.addContent(HtmlTree.LI(contents.getContent("doclet.help.enum.definition")));
|
||||
eul.addContent(HtmlTree.LI(contents.enumConstantSummary));
|
||||
eul.addContent(HtmlTree.LI(contents.enumConstantDetailLabel));
|
||||
htmlTree.addContent(eul);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
eul.add(HtmlTree.LI(contents.getContent("doclet.help.enum.declaration")));
|
||||
eul.add(HtmlTree.LI(contents.getContent("doclet.help.enum.definition")));
|
||||
eul.add(HtmlTree.LI(contents.enumConstantSummary));
|
||||
eul.add(HtmlTree.LI(contents.enumConstantDetailLabel));
|
||||
htmlTree.add(eul);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
// Class Use
|
||||
if (configuration.classuse) {
|
||||
@ -245,8 +245,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(useHead);
|
||||
Content useBody = contents.getContent("doclet.help.use.body");
|
||||
Content usePara = HtmlTree.P(useBody);
|
||||
htmlTree.addContent(usePara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(usePara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Tree
|
||||
@ -259,12 +259,12 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
resources.getText("doclet.Class_Hierarchy")),
|
||||
HtmlTree.CODE(new StringContent("java.lang.Object")));
|
||||
Content treePara = HtmlTree.P(treeIntro);
|
||||
htmlTree.addContent(treePara);
|
||||
htmlTree.add(treePara);
|
||||
HtmlTree tul = new HtmlTree(HtmlTag.UL);
|
||||
tul.addContent(HtmlTree.LI(contents.getContent("doclet.help.tree.overview")));
|
||||
tul.addContent(HtmlTree.LI(contents.getContent("doclet.help.tree.package")));
|
||||
htmlTree.addContent(tul);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
tul.add(HtmlTree.LI(contents.getContent("doclet.help.tree.overview")));
|
||||
tul.add(HtmlTree.LI(contents.getContent("doclet.help.tree.package")));
|
||||
htmlTree.add(tul);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
@ -276,8 +276,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
links.createLink(DocPaths.DEPRECATED_LIST,
|
||||
resources.getText("doclet.Deprecated_API")));
|
||||
Content dPara = HtmlTree.P(deprBody);
|
||||
htmlTree.addContent(dPara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(dPara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Index
|
||||
@ -295,8 +295,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(indexHead);
|
||||
Content indexBody = contents.getContent("doclet.help.index.body", indexlink);
|
||||
Content indexPara = HtmlTree.P(indexBody);
|
||||
htmlTree.addContent(indexPara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(indexPara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Frames
|
||||
@ -306,9 +306,9 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(frameHead);
|
||||
Content framesBody = contents.getContent("doclet.help.frames.body");
|
||||
Content framePara = HtmlTree.P(framesBody);
|
||||
htmlTree.addContent(framePara);
|
||||
htmlTree.add(framePara);
|
||||
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
}
|
||||
|
||||
// Serialized Form
|
||||
@ -317,8 +317,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(sHead);
|
||||
Content serialBody = contents.getContent("doclet.help.serial_form.body");
|
||||
Content serialPara = HtmlTree.P(serialBody);
|
||||
htmlTree.addContent(serialPara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(serialPara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
// Constant Field Values
|
||||
Content constHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
|
||||
@ -328,8 +328,8 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
links.createLink(DocPaths.CONSTANT_VALUES,
|
||||
resources.getText("doclet.Constants_Summary")));
|
||||
Content constPara = HtmlTree.P(constantsBody);
|
||||
htmlTree.addContent(constPara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(constPara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
// Search
|
||||
Content searchHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
|
||||
@ -337,15 +337,15 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
htmlTree = HtmlTree.SECTION(searchHead);
|
||||
Content searchBody = contents.getContent("doclet.help.search.body");
|
||||
Content searchPara = HtmlTree.P(searchBody);
|
||||
htmlTree.addContent(searchPara);
|
||||
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
htmlTree.add(searchPara);
|
||||
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||
|
||||
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
|
||||
divContent.addContent(new HtmlTree(HtmlTag.HR));
|
||||
divContent.add(new HtmlTree(HtmlTag.HR));
|
||||
Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
|
||||
contents.getContent("doclet.help.footnote"));
|
||||
divContent.addContent(footnote);
|
||||
mainTree.addContent(divContent);
|
||||
contentTree.addContent(mainTree);
|
||||
divContent.add(footnote);
|
||||
mainTree.add(divContent);
|
||||
contentTree.add(mainTree);
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -72,7 +71,6 @@ import com.sun.source.doctree.TextTree;
|
||||
import com.sun.source.util.SimpleDocTreeVisitor;
|
||||
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.DocType;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
|
||||
@ -287,7 +285,7 @@ public class HtmlDocletWriter {
|
||||
Content div = HtmlTree.DIV(script.asContent());
|
||||
Content div_noscript = HtmlTree.DIV(contents.noScriptMessage);
|
||||
Content noScript = HtmlTree.NOSCRIPT(div_noscript);
|
||||
div.addContent(noScript);
|
||||
div.add(noScript);
|
||||
return div;
|
||||
}
|
||||
|
||||
@ -336,8 +334,8 @@ public class HtmlDocletWriter {
|
||||
TagletWriter.genTagOutput(configuration.tagletManager, e,
|
||||
configuration.tagletManager.getBlockTaglets(e),
|
||||
getTagletWriterInstance(false), output);
|
||||
dl.addContent(output);
|
||||
htmltree.addContent(dl);
|
||||
dl.add(output);
|
||||
htmltree.add(dl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -509,7 +507,7 @@ public class HtmlDocletWriter {
|
||||
*/
|
||||
public void addTop(Content htmlTree) {
|
||||
Content top = new RawHtml(replaceDocRootDir(configuration.top));
|
||||
fixedNavDiv.addContent(top);
|
||||
fixedNavDiv.add(top);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -521,7 +519,7 @@ public class HtmlDocletWriter {
|
||||
Content bottom = new RawHtml(replaceDocRootDir(configuration.bottom));
|
||||
Content small = HtmlTree.SMALL(bottom);
|
||||
Content p = HtmlTree.P(HtmlStyle.legalCopy, small);
|
||||
htmlTree.addContent(p);
|
||||
htmlTree.add(p);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -548,7 +546,7 @@ public class HtmlDocletWriter {
|
||||
Content space = Contents.SPACE;
|
||||
Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, space);
|
||||
Content caption = HtmlTree.CAPTION(captionSpan);
|
||||
caption.addContent(tabSpan);
|
||||
caption.add(tabSpan);
|
||||
return caption;
|
||||
}
|
||||
|
||||
@ -699,9 +697,9 @@ public class HtmlDocletWriter {
|
||||
.resolve(docPaths.forClass(te));
|
||||
Content content = links.createLink(href
|
||||
.fragment(SourceToHTMLConverter.getAnchorName(utils, element)), label, "", "");
|
||||
htmltree.addContent(content);
|
||||
htmltree.add(content);
|
||||
} else {
|
||||
htmltree.addContent(label);
|
||||
htmltree.add(label);
|
||||
}
|
||||
}
|
||||
|
||||
@ -823,9 +821,9 @@ public class HtmlDocletWriter {
|
||||
ContentBuilder classlink = new ContentBuilder();
|
||||
PackageElement pkg = utils.containingPackage(typeElement);
|
||||
if (pkg != null && ! configuration.shouldExcludeQualifier(pkg.getSimpleName().toString())) {
|
||||
classlink.addContent(getEnclosingPackageName(typeElement));
|
||||
classlink.add(getEnclosingPackageName(typeElement));
|
||||
}
|
||||
classlink.addContent(getLink(new LinkInfoImpl(configuration,
|
||||
classlink.add(getLink(new LinkInfoImpl(configuration,
|
||||
context, typeElement).label(utils.getSimpleName(typeElement)).strong(isStrong)));
|
||||
return classlink;
|
||||
}
|
||||
@ -844,13 +842,13 @@ public class HtmlDocletWriter {
|
||||
TypeElement typeElement, boolean isStrong, Content contentTree) {
|
||||
PackageElement pkg = utils.containingPackage(typeElement);
|
||||
if(pkg != null && ! configuration.shouldExcludeQualifier(pkg.getSimpleName().toString())) {
|
||||
contentTree.addContent(getEnclosingPackageName(typeElement));
|
||||
contentTree.add(getEnclosingPackageName(typeElement));
|
||||
}
|
||||
LinkInfoImpl linkinfo = new LinkInfoImpl(configuration, context, typeElement)
|
||||
.label(utils.getSimpleName(typeElement))
|
||||
.strong(isStrong);
|
||||
Content link = getLink(linkinfo);
|
||||
contentTree.addContent(link);
|
||||
contentTree.add(link);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1262,14 +1260,14 @@ public class HtmlDocletWriter {
|
||||
Content result = commentTagsToContent(null, element, tags, first, inSummary);
|
||||
if (depr) {
|
||||
div = HtmlTree.DIV(HtmlStyle.deprecationComment, result);
|
||||
htmltree.addContent(div);
|
||||
htmltree.add(div);
|
||||
}
|
||||
else {
|
||||
div = HtmlTree.DIV(HtmlStyle.block, result);
|
||||
htmltree.addContent(div);
|
||||
htmltree.add(div);
|
||||
}
|
||||
if (tags.isEmpty()) {
|
||||
htmltree.addContent(Contents.SPACE);
|
||||
htmltree.add(Contents.SPACE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1341,8 +1339,8 @@ public class HtmlDocletWriter {
|
||||
|
||||
final Content result = new ContentBuilder() {
|
||||
@Override
|
||||
public void addContent(CharSequence text) {
|
||||
super.addContent(utils.normalizeNewlines(text));
|
||||
public void add(CharSequence text) {
|
||||
super.add(utils.normalizeNewlines(text));
|
||||
}
|
||||
};
|
||||
CommentHelper ch = utils.getCommentHelper(element);
|
||||
@ -1392,7 +1390,7 @@ public class HtmlDocletWriter {
|
||||
public Boolean visitAttribute(AttributeTree node, Content c) {
|
||||
StringBuilder sb = new StringBuilder(SPACER).append(node.getName());
|
||||
if (node.getValueKind() == ValueKind.EMPTY) {
|
||||
result.addContent(sb);
|
||||
result.add(sb);
|
||||
return false;
|
||||
}
|
||||
sb.append("=");
|
||||
@ -1409,7 +1407,7 @@ public class HtmlDocletWriter {
|
||||
break;
|
||||
}
|
||||
sb.append(quote);
|
||||
result.addContent(sb);
|
||||
result.add(sb);
|
||||
Content docRootContent = new ContentBuilder();
|
||||
|
||||
boolean isHRef = inAnAtag() && node.getName().toString().equalsIgnoreCase("href");
|
||||
@ -1417,16 +1415,16 @@ public class HtmlDocletWriter {
|
||||
if (utils.isText(dt) && isHRef) {
|
||||
String text = ((TextTree) dt).getBody();
|
||||
if (text.startsWith("/..") && !configuration.docrootparent.isEmpty()) {
|
||||
result.addContent(configuration.docrootparent);
|
||||
result.add(configuration.docrootparent);
|
||||
docRootContent = new ContentBuilder();
|
||||
result.addContent(textCleanup(text.substring(3), isLastNode));
|
||||
result.add(textCleanup(text.substring(3), isLastNode));
|
||||
} else {
|
||||
if (!docRootContent.isEmpty()) {
|
||||
docRootContent = copyDocRootContent(docRootContent);
|
||||
} else {
|
||||
text = redirectRelativeLinks(element, (TextTree) dt);
|
||||
}
|
||||
result.addContent(textCleanup(text, isLastNode));
|
||||
result.add(textCleanup(text, isLastNode));
|
||||
}
|
||||
} else {
|
||||
docRootContent = copyDocRootContent(docRootContent);
|
||||
@ -1434,19 +1432,19 @@ public class HtmlDocletWriter {
|
||||
}
|
||||
}
|
||||
copyDocRootContent(docRootContent);
|
||||
result.addContent(quote);
|
||||
result.add(quote);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean visitComment(CommentTree node, Content c) {
|
||||
result.addContent(new RawHtml(node.getBody()));
|
||||
result.add(new RawHtml(node.getBody()));
|
||||
return false;
|
||||
}
|
||||
|
||||
private Content copyDocRootContent(Content content) {
|
||||
if (!content.isEmpty()) {
|
||||
result.addContent(content);
|
||||
result.add(content);
|
||||
return new ContentBuilder();
|
||||
}
|
||||
return content;
|
||||
@ -1460,9 +1458,9 @@ public class HtmlDocletWriter {
|
||||
node,
|
||||
getTagletWriterInstance(isFirstSentence));
|
||||
if (c != null) {
|
||||
c.addContent(docRootContent);
|
||||
c.add(docRootContent);
|
||||
} else {
|
||||
result.addContent(docRootContent);
|
||||
result.add(docRootContent);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1470,13 +1468,13 @@ public class HtmlDocletWriter {
|
||||
@Override
|
||||
public Boolean visitEndElement(EndElementTree node, Content c) {
|
||||
RawHtml rawHtml = new RawHtml("</" + node.getName() + ">");
|
||||
result.addContent(rawHtml);
|
||||
result.add(rawHtml);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean visitEntity(EntityTree node, Content c) {
|
||||
result.addContent(new RawHtml(node.toString()));
|
||||
result.add(new RawHtml(node.toString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1484,7 +1482,7 @@ public class HtmlDocletWriter {
|
||||
public Boolean visitErroneous(ErroneousTree node, Content c) {
|
||||
messages.warning(ch.getDocTreePath(node),
|
||||
"doclet.tag.invalid_usage", node);
|
||||
result.addContent(new RawHtml(node.toString()));
|
||||
result.add(new RawHtml(node.toString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1493,7 +1491,7 @@ public class HtmlDocletWriter {
|
||||
Content output = TagletWriter.getInlineTagOutput(element,
|
||||
configuration.tagletManager, holderTag,
|
||||
tag, getTagletWriterInstance(isFirstSentence));
|
||||
result.addContent(output);
|
||||
result.add(output);
|
||||
// if we obtained the first sentence successfully, nothing more to do
|
||||
return (isFirstSentence && !output.isEmpty());
|
||||
}
|
||||
@ -1504,7 +1502,7 @@ public class HtmlDocletWriter {
|
||||
configuration.tagletManager, holderTag, tag,
|
||||
getTagletWriterInstance(isFirstSentence, inSummary));
|
||||
if (output != null) {
|
||||
result.addContent(output);
|
||||
result.add(output);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1512,7 +1510,7 @@ public class HtmlDocletWriter {
|
||||
@Override
|
||||
public Boolean visitLink(LinkTree node, Content c) {
|
||||
// we need to pass the DocTreeImpl here, so ignore node
|
||||
result.addContent(seeTagToContent(element, tag));
|
||||
result.add(seeTagToContent(element, tag));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1522,14 +1520,14 @@ public class HtmlDocletWriter {
|
||||
Content content = new StringContent(utils.normalizeNewlines(s));
|
||||
if (node.getKind() == CODE)
|
||||
content = HtmlTree.CODE(content);
|
||||
result.addContent(content);
|
||||
result.add(content);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean visitSee(SeeTree node, Content c) {
|
||||
// we need to pass the DocTreeImpl here, so ignore node
|
||||
result.addContent(seeTagToContent(element, tag));
|
||||
result.add(seeTagToContent(element, tag));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1537,12 +1535,12 @@ public class HtmlDocletWriter {
|
||||
public Boolean visitStartElement(StartElementTree node, Content c) {
|
||||
String text = "<" + node.getName();
|
||||
RawHtml rawHtml = new RawHtml(utils.normalizeNewlines(text));
|
||||
result.addContent(rawHtml);
|
||||
result.add(rawHtml);
|
||||
|
||||
for (DocTree dt : node.getAttributes()) {
|
||||
dt.accept(this, null);
|
||||
}
|
||||
result.addContent(new RawHtml(node.isSelfClosing() ? "/>" : ">"));
|
||||
result.add(new RawHtml(node.isSelfClosing() ? "/>" : ">"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1551,7 +1549,7 @@ public class HtmlDocletWriter {
|
||||
Content output = TagletWriter.getInlineTagOutput(element,
|
||||
configuration.tagletManager, holderTag, tag,
|
||||
getTagletWriterInstance(isFirstSentence));
|
||||
result.addContent(output);
|
||||
result.add(output);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1561,7 +1559,7 @@ public class HtmlDocletWriter {
|
||||
configuration.tagletManager, holderTag, tag,
|
||||
getTagletWriterInstance(isFirstSentence, inSummary));
|
||||
if (output != null) {
|
||||
result.addContent(output);
|
||||
result.add(output);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1584,7 +1582,7 @@ public class HtmlDocletWriter {
|
||||
@Override
|
||||
public Boolean visitText(TextTree node, Content c) {
|
||||
String text = node.getBody();
|
||||
result.addContent(new RawHtml(textCleanup(text, isLastNode, commentRemoved)));
|
||||
result.add(new RawHtml(textCleanup(text, isLastNode, commentRemoved)));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1594,7 +1592,7 @@ public class HtmlDocletWriter {
|
||||
configuration.tagletManager, holderTag, tag,
|
||||
getTagletWriterInstance(isFirstSentence));
|
||||
if (output != null) {
|
||||
result.addContent(output);
|
||||
result.add(output);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1804,8 +1802,8 @@ public class HtmlDocletWriter {
|
||||
return false;
|
||||
}
|
||||
for (Content annotation: annotations) {
|
||||
htmltree.addContent(sep);
|
||||
htmltree.addContent(annotation);
|
||||
htmltree.add(sep);
|
||||
htmltree.add(annotation);
|
||||
if (!lineBreak) {
|
||||
sep = " ";
|
||||
}
|
||||
@ -1894,8 +1892,8 @@ public class HtmlDocletWriter {
|
||||
|
||||
String sep = "";
|
||||
for (AnnotationValue av : annotationTypeValues) {
|
||||
annotation.addContent(sep);
|
||||
annotation.addContent(annotationValueToContent(av));
|
||||
annotation.add(sep);
|
||||
annotation.add(annotationValueToContent(av));
|
||||
sep = " ";
|
||||
}
|
||||
}
|
||||
@ -1918,8 +1916,8 @@ public class HtmlDocletWriter {
|
||||
}
|
||||
String sep = "";
|
||||
for (AnnotationValue av : annotationTypeValues) {
|
||||
annotation.addContent(sep);
|
||||
annotation.addContent(annotationValueToContent(av));
|
||||
annotation.add(sep);
|
||||
annotation.add(annotationValueToContent(av));
|
||||
sep = " ";
|
||||
}
|
||||
}
|
||||
@ -1934,7 +1932,7 @@ public class HtmlDocletWriter {
|
||||
addAnnotations(annotationElement, linkInfo, annotation, pairs,
|
||||
indent, linkBreak);
|
||||
}
|
||||
annotation.addContent(linkBreak ? DocletConstants.NL : "");
|
||||
annotation.add(linkBreak ? DocletConstants.NL : "");
|
||||
results.add(annotation);
|
||||
}
|
||||
return results;
|
||||
@ -1955,10 +1953,10 @@ public class HtmlDocletWriter {
|
||||
Map<? extends ExecutableElement, ? extends AnnotationValue> map,
|
||||
int indent, boolean linkBreak) {
|
||||
linkInfo.label = new StringContent("@");
|
||||
linkInfo.label.addContent(annotationDoc.getSimpleName());
|
||||
annotation.addContent(getLink(linkInfo));
|
||||
linkInfo.label.add(annotationDoc.getSimpleName());
|
||||
annotation.add(getLink(linkInfo));
|
||||
if (!map.isEmpty()) {
|
||||
annotation.addContent("(");
|
||||
annotation.add("(");
|
||||
boolean isFirst = true;
|
||||
Set<? extends ExecutableElement> keys = map.keySet();
|
||||
boolean multipleValues = keys.size() > 1;
|
||||
@ -1966,20 +1964,20 @@ public class HtmlDocletWriter {
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
annotation.addContent(",");
|
||||
annotation.add(",");
|
||||
if (linkBreak) {
|
||||
annotation.addContent(DocletConstants.NL);
|
||||
annotation.add(DocletConstants.NL);
|
||||
int spaces = annotationDoc.getSimpleName().length() + 2;
|
||||
for (int k = 0; k < (spaces + indent); k++) {
|
||||
annotation.addContent(" ");
|
||||
annotation.add(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
String simpleName = element.getSimpleName().toString();
|
||||
if (multipleValues || !"value".equals(simpleName)) { // Omit "value=" where unnecessary
|
||||
annotation.addContent(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
|
||||
annotation.add(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
|
||||
element, simpleName, false));
|
||||
annotation.addContent("=");
|
||||
annotation.add("=");
|
||||
}
|
||||
AnnotationValue annotationValue = map.get(element);
|
||||
List<AnnotationValue> annotationTypeValues = new ArrayList<>();
|
||||
@ -1995,17 +1993,17 @@ public class HtmlDocletWriter {
|
||||
return null;
|
||||
}
|
||||
}.visit(annotationValue, annotationValue);
|
||||
annotation.addContent(annotationTypeValues.size() == 1 ? "" : "{");
|
||||
annotation.add(annotationTypeValues.size() == 1 ? "" : "{");
|
||||
String sep = "";
|
||||
for (AnnotationValue av : annotationTypeValues) {
|
||||
annotation.addContent(sep);
|
||||
annotation.addContent(annotationValueToContent(av));
|
||||
annotation.add(sep);
|
||||
annotation.add(annotationValueToContent(av));
|
||||
sep = ",";
|
||||
}
|
||||
annotation.addContent(annotationTypeValues.size() == 1 ? "" : "}");
|
||||
annotation.add(annotationTypeValues.size() == 1 ? "" : "}");
|
||||
isContainerDocumented = false;
|
||||
}
|
||||
annotation.addContent(")");
|
||||
annotation.add(")");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2086,7 +2084,7 @@ public class HtmlDocletWriter {
|
||||
List<Content> list = getAnnotations(0, a, false);
|
||||
ContentBuilder buf = new ContentBuilder();
|
||||
for (Content c : list) {
|
||||
buf.addContent(c);
|
||||
buf.add(c);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
@ -2100,8 +2098,8 @@ public class HtmlDocletWriter {
|
||||
ContentBuilder buf = new ContentBuilder();
|
||||
String sep = "";
|
||||
for (AnnotationValue av : vals) {
|
||||
buf.addContent(sep);
|
||||
buf.addContent(visit(av));
|
||||
buf.add(sep);
|
||||
buf.add(visit(av));
|
||||
sep = " ";
|
||||
}
|
||||
return buf;
|
||||
@ -2198,7 +2196,7 @@ public class HtmlDocletWriter {
|
||||
*/
|
||||
public HtmlTree getBody(boolean includeScript, String title) {
|
||||
HtmlTree body = new HtmlTree(HtmlTag.BODY);
|
||||
body.addAttr(HtmlAttr.CLASS, getBodyClass());
|
||||
body.put(HtmlAttr.CLASS, getBodyClass());
|
||||
|
||||
// Set window title string which is later printed
|
||||
this.winTitle = title;
|
||||
@ -2206,9 +2204,9 @@ public class HtmlDocletWriter {
|
||||
// and package-frame
|
||||
if (includeScript) {
|
||||
this.mainBodyScript = getWinTitleScript();
|
||||
body.addContent(mainBodyScript.asContent());
|
||||
body.add(mainBodyScript.asContent());
|
||||
Content noScript = HtmlTree.NOSCRIPT(HtmlTree.DIV(contents.noScriptMessage));
|
||||
body.addContent(noScript);
|
||||
body.add(noScript);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
@ -2236,7 +2234,7 @@ public class HtmlDocletWriter {
|
||||
configuration.localStylesheetMap.put(element, localStylesheets);
|
||||
}
|
||||
for (DocPath stylesheet : localStylesheets) {
|
||||
stylesheetContent.addContent(HtmlTree.LINK("stylesheet",
|
||||
stylesheetContent.add(HtmlTree.LINK("stylesheet",
|
||||
"text/css", stylesheet.getPath(), "Style"));
|
||||
}
|
||||
return stylesheetContent;
|
||||
|
@ -108,8 +108,8 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
if (serializableFieldsTree.isValid()) {
|
||||
Content headingContent = new StringContent(heading);
|
||||
Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent);
|
||||
li.addContent(serialHeading);
|
||||
li.addContent(serializableFieldsTree);
|
||||
li.add(serialHeading);
|
||||
li.add(serializableFieldsTree);
|
||||
}
|
||||
return li;
|
||||
}
|
||||
@ -119,32 +119,32 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
String fieldDimensions, String fieldName, Content contentTree) {
|
||||
Content nameContent = new StringContent(fieldName);
|
||||
Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, nameContent);
|
||||
contentTree.addContent(heading);
|
||||
contentTree.add(heading);
|
||||
Content pre = new HtmlTree(HtmlTag.PRE);
|
||||
if (fieldType == null) {
|
||||
pre.addContent(fieldTypeStr);
|
||||
pre.add(fieldTypeStr);
|
||||
} else {
|
||||
Content fieldContent = writer.getLink(new LinkInfoImpl(
|
||||
configuration, LinkInfoImpl.Kind.SERIAL_MEMBER, fieldType));
|
||||
pre.addContent(fieldContent);
|
||||
pre.add(fieldContent);
|
||||
}
|
||||
pre.addContent(fieldDimensions + " ");
|
||||
pre.addContent(fieldName);
|
||||
contentTree.addContent(pre);
|
||||
pre.add(fieldDimensions + " ");
|
||||
pre.add(fieldName);
|
||||
contentTree.add(pre);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMemberHeader(TypeMirror fieldType, String fieldName, Content contentTree) {
|
||||
Content nameContent = new StringContent(fieldName);
|
||||
Content heading = HtmlTree.HEADING(HtmlTag.H5, nameContent);
|
||||
contentTree.addContent(heading);
|
||||
contentTree.add(heading);
|
||||
Content pre = new HtmlTree(HtmlTag.PRE);
|
||||
Content fieldContent = writer.getLink(new LinkInfoImpl(
|
||||
configuration, LinkInfoImpl.Kind.SERIAL_MEMBER, fieldType));
|
||||
pre.addContent(fieldContent);
|
||||
pre.addContent(" ");
|
||||
pre.addContent(fieldName);
|
||||
contentTree.addContent(pre);
|
||||
pre.add(fieldContent);
|
||||
pre.add(" ");
|
||||
pre.add(fieldName);
|
||||
contentTree.add(pre);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,7 +185,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
if (!description.isEmpty()) {
|
||||
Content serialFieldContent = new RawHtml(ch.getText(description));
|
||||
Content div = HtmlTree.DIV(HtmlStyle.block, serialFieldContent);
|
||||
contentTree.addContent(div);
|
||||
contentTree.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,8 +201,8 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
configuration.tagletManager.getBlockTaglets(field),
|
||||
writer.getTagletWriterInstance(false), tagContent);
|
||||
Content dlTags = new HtmlTree(HtmlTag.DL);
|
||||
dlTags.addContent(tagContent);
|
||||
contentTree.addContent(dlTags); // TODO: what if empty?
|
||||
dlTags.add(tagContent);
|
||||
contentTree.add(dlTags); // TODO: what if empty?
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,7 +96,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
|
||||
Content headingContent = new StringContent(heading);
|
||||
Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent);
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, serialHeading);
|
||||
li.addContent(serializableMethodContent);
|
||||
li.add(serializableMethodContent);
|
||||
return li;
|
||||
}
|
||||
|
||||
@ -120,8 +120,8 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
|
||||
public void addMemberHeader(ExecutableElement member, Content methodsContentTree) {
|
||||
Content memberContent = new StringContent(name(member));
|
||||
Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, memberContent);
|
||||
methodsContentTree.addContent(heading);
|
||||
methodsContentTree.addContent(getSignature(member));
|
||||
methodsContentTree.add(heading);
|
||||
methodsContentTree.add(getSignature(member));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,8 +158,8 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
|
||||
tagletManager.getSerializedFormTaglets(),
|
||||
writer.getTagletWriterInstance(false), tagContent);
|
||||
Content dlTags = new HtmlTree(HtmlTag.DL);
|
||||
dlTags.addContent(tagContent);
|
||||
methodsContentTree.addContent(dlTags);
|
||||
dlTags.add(tagContent);
|
||||
methodsContentTree.add(dlTags);
|
||||
if (name(member).compareTo("writeExternal") == 0
|
||||
&& utils.getSerialDataTrees(member).isEmpty()) {
|
||||
serialWarning(member, "doclet.MissingSerialDataTag",
|
||||
|
@ -29,7 +29,6 @@ import java.util.Collections;
|
||||
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.Head;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.DocType;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
|
||||
@ -42,8 +41,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* Writes a file that tries to redirect to an alternate page.
|
||||
* The redirect uses JavaScript, if enabled, falling back on
|
||||
@ -97,20 +94,20 @@ public class IndexRedirectWriter extends HtmlDocletWriter {
|
||||
.appendStringLiteral(targetPath, '\'')
|
||||
.append(")");
|
||||
HtmlTree metaRefresh = new HtmlTree(HtmlTag.META)
|
||||
.addAttr(HtmlAttr.HTTP_EQUIV, "Refresh")
|
||||
.addAttr(HtmlAttr.CONTENT, "0;" + targetPath);
|
||||
.put(HtmlAttr.HTTP_EQUIV, "Refresh")
|
||||
.put(HtmlAttr.CONTENT, "0;" + targetPath);
|
||||
head.addContent(script.asContent(), HtmlTree.NOSCRIPT(metaRefresh));
|
||||
|
||||
ContentBuilder bodyContent = new ContentBuilder();
|
||||
bodyContent.addContent(HtmlTree.NOSCRIPT(
|
||||
bodyContent.add(HtmlTree.NOSCRIPT(
|
||||
HtmlTree.P(contents.getContent("doclet.No_Script_Message"))));
|
||||
|
||||
bodyContent.addContent(HtmlTree.P(HtmlTree.A(targetPath, new StringContent(targetPath))));
|
||||
bodyContent.add(HtmlTree.P(HtmlTree.A(targetPath, new StringContent(targetPath))));
|
||||
|
||||
Content body = new HtmlTree(HtmlTag.BODY)
|
||||
.addAttr(HtmlAttr.CLASS, "index-redirect");
|
||||
.put(HtmlAttr.CLASS, "index-redirect");
|
||||
HtmlTree main = HtmlTree.MAIN(bodyContent);
|
||||
body.addContent(main);
|
||||
body.add(main);
|
||||
|
||||
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head.toContent(), body);
|
||||
HtmlDocument htmlDocument = new HtmlDocument(htmlComment, htmlTree);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -97,14 +97,14 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
DocPath filename = getPath(classLinkInfo);
|
||||
if (linkInfo.linkToSelf ||
|
||||
!(docPaths.forName(typeElement)).equals(m_writer.filename)) {
|
||||
link.addContent(m_writer.links.createLink(
|
||||
link.add(m_writer.links.createLink(
|
||||
filename.fragment(classLinkInfo.where),
|
||||
label,
|
||||
classLinkInfo.isStrong,
|
||||
title,
|
||||
classLinkInfo.target));
|
||||
if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
|
||||
link.addContent(getTypeParameterLinks(linkInfo));
|
||||
link.add(getTypeParameterLinks(linkInfo));
|
||||
}
|
||||
return link;
|
||||
}
|
||||
@ -114,17 +114,17 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
typeElement, classLinkInfo.where,
|
||||
label, classLinkInfo.isStrong, true);
|
||||
if (crossLink != null) {
|
||||
link.addContent(crossLink);
|
||||
link.add(crossLink);
|
||||
if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
|
||||
link.addContent(getTypeParameterLinks(linkInfo));
|
||||
link.add(getTypeParameterLinks(linkInfo));
|
||||
}
|
||||
return link;
|
||||
}
|
||||
}
|
||||
// Can't link so just write label.
|
||||
link.addContent(label);
|
||||
link.add(label);
|
||||
if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
|
||||
link.addContent(getTypeParameterLinks(linkInfo));
|
||||
link.add(getTypeParameterLinks(linkInfo));
|
||||
}
|
||||
return link;
|
||||
}
|
||||
@ -157,17 +157,17 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
}
|
||||
if (((linkInfo.includeTypeInClassLinkLabel && isClassLabel)
|
||||
|| (linkInfo.includeTypeAsSepLink && !isClassLabel)) && !vars.isEmpty()) {
|
||||
links.addContent("<");
|
||||
links.add("<");
|
||||
boolean many = false;
|
||||
for (TypeMirror t : vars) {
|
||||
if (many) {
|
||||
links.addContent(",");
|
||||
links.addContent(Contents.ZERO_WIDTH_SPACE);
|
||||
links.add(",");
|
||||
links.add(Contents.ZERO_WIDTH_SPACE);
|
||||
}
|
||||
links.addContent(getTypeParameterLink(linkInfo, t));
|
||||
links.add(getTypeParameterLink(linkInfo, t));
|
||||
many = true;
|
||||
}
|
||||
links.addContent(">");
|
||||
links.add(">");
|
||||
}
|
||||
return links;
|
||||
}
|
||||
@ -222,13 +222,13 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
boolean isFirst = true;
|
||||
for (Content anno : annos) {
|
||||
if (!isFirst) {
|
||||
links.addContent(" ");
|
||||
links.add(" ");
|
||||
}
|
||||
links.addContent(anno);
|
||||
links.add(anno);
|
||||
isFirst = false;
|
||||
}
|
||||
if (!annos.isEmpty()) {
|
||||
links.addContent(" ");
|
||||
links.add(" ");
|
||||
}
|
||||
|
||||
return links;
|
||||
|
@ -86,7 +86,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(MarkerComments.START_OF_METHOD_SUMMARY);
|
||||
memberSummaryTree.add(MarkerComments.START_OF_METHOD_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
return memberTree;
|
||||
@ -105,12 +105,12 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public Content getMethodDetailsTreeHeader(TypeElement typeElement, Content memberDetailsTree) {
|
||||
memberDetailsTree.addContent(MarkerComments.START_OF_METHOD_DETAILS);
|
||||
memberDetailsTree.add(MarkerComments.START_OF_METHOD_DETAILS);
|
||||
Content methodDetailsTree = writer.getMemberTreeHeader();
|
||||
methodDetailsTree.addContent(links.createAnchor(SectionName.METHOD_DETAIL));
|
||||
methodDetailsTree.add(links.createAnchor(SectionName.METHOD_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.methodDetailLabel);
|
||||
methodDetailsTree.addContent(heading);
|
||||
methodDetailsTree.add(heading);
|
||||
return methodDetailsTree;
|
||||
}
|
||||
|
||||
@ -121,13 +121,13 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
public Content getMethodDocTreeHeader(ExecutableElement method, Content methodDetailsTree) {
|
||||
String erasureAnchor;
|
||||
if ((erasureAnchor = getErasureAnchor(method)) != null) {
|
||||
methodDetailsTree.addContent(links.createAnchor((erasureAnchor)));
|
||||
methodDetailsTree.add(links.createAnchor((erasureAnchor)));
|
||||
}
|
||||
methodDetailsTree.addContent(links.createAnchor(writer.getAnchor(method)));
|
||||
methodDetailsTree.add(links.createAnchor(writer.getAnchor(method)));
|
||||
Content methodDocTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(name(method));
|
||||
methodDocTree.addContent(heading);
|
||||
heading.add(name(method));
|
||||
methodDocTree.add(heading);
|
||||
return methodDocTree;
|
||||
}
|
||||
|
||||
@ -190,9 +190,9 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
utils.isClass(holder)
|
||||
? contents.descfrmClassLabel
|
||||
: contents.descfrmInterfaceLabel);
|
||||
descfrmLabel.addContent(Contents.SPACE);
|
||||
descfrmLabel.addContent(codelLink);
|
||||
methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
|
||||
descfrmLabel.add(Contents.SPACE);
|
||||
descfrmLabel.add(codelLink);
|
||||
methodDocTree.add(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
|
||||
writer.addInlineComment(method, methodDocTree);
|
||||
}
|
||||
}
|
||||
@ -230,7 +230,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.methodSummary);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -265,7 +265,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(SectionName.METHOD_SUMMARY));
|
||||
memberTree.add(links.createAnchor(SectionName.METHOD_SUMMARY));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -273,7 +273,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
|
||||
inheritedTree.addContent(links.createAnchor(
|
||||
inheritedTree.add(links.createAnchor(
|
||||
SectionName.METHODS_INHERITANCE, configuration.getClassName(typeElement)));
|
||||
}
|
||||
|
||||
@ -296,9 +296,9 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
}
|
||||
Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING,
|
||||
label);
|
||||
labelHeading.addContent(Contents.SPACE);
|
||||
labelHeading.addContent(classLink);
|
||||
inheritedTree.addContent(labelHeading);
|
||||
labelHeading.add(Contents.SPACE);
|
||||
labelHeading.add(classLink);
|
||||
inheritedTree.add(labelHeading);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -342,7 +342,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
context = LinkInfoImpl.Kind.METHOD_SPECIFIED_BY;
|
||||
}
|
||||
Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, label));
|
||||
dl.addContent(dt);
|
||||
dl.add(dt);
|
||||
Content overriddenTypeLink =
|
||||
writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType));
|
||||
Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink);
|
||||
@ -352,11 +352,11 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
.where(writer.links.getName(writer.getAnchor(method))).label(method.getSimpleName()));
|
||||
Content codeMethLink = HtmlTree.CODE(methlink);
|
||||
Content dd = HtmlTree.DD(codeMethLink);
|
||||
dd.addContent(Contents.SPACE);
|
||||
dd.addContent(writer.contents.inClass);
|
||||
dd.addContent(Contents.SPACE);
|
||||
dd.addContent(codeOverridenTypeLink);
|
||||
dl.addContent(dd);
|
||||
dd.add(Contents.SPACE);
|
||||
dd.add(writer.contents.inClass);
|
||||
dd.add(Contents.SPACE);
|
||||
dd.add(codeOverridenTypeLink);
|
||||
dl.add(dd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -382,17 +382,17 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
writer.configuration, LinkInfoImpl.Kind.METHOD_SPECIFIED_BY, intfac));
|
||||
Content codeIntfacLink = HtmlTree.CODE(intfaclink);
|
||||
Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, contents.specifiedByLabel));
|
||||
dl.addContent(dt);
|
||||
dl.add(dt);
|
||||
Content methlink = writer.getDocLink(
|
||||
LinkInfoImpl.Kind.MEMBER, implementedMeth,
|
||||
implementedMeth.getSimpleName(), false);
|
||||
Content codeMethLink = HtmlTree.CODE(methlink);
|
||||
Content dd = HtmlTree.DD(codeMethLink);
|
||||
dd.addContent(Contents.SPACE);
|
||||
dd.addContent(contents.inInterface);
|
||||
dd.addContent(Contents.SPACE);
|
||||
dd.addContent(codeIntfacLink);
|
||||
dl.addContent(dd);
|
||||
dd.add(Contents.SPACE);
|
||||
dd.add(contents.inInterface);
|
||||
dd.add(Contents.SPACE);
|
||||
dd.add(codeIntfacLink);
|
||||
dl.add(dd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,8 +407,8 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
if (type != null) {
|
||||
Content linkContent = writer.getLink(
|
||||
new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type));
|
||||
htmltree.addContent(linkContent);
|
||||
htmltree.addContent(Contents.SPACE);
|
||||
htmltree.add(linkContent);
|
||||
htmltree.add(Contents.SPACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -102,12 +102,12 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
|
||||
: configuration.docPaths.moduleSummary(moduleElement);
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.bar,
|
||||
mdlgen.links.createLink(moduleSummary, mdlLabel, "", "classFrame"));
|
||||
htmlTree.addContent(heading);
|
||||
htmlTree.add(heading);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.indexContainer);
|
||||
mdlgen.addClassListing(div);
|
||||
htmlTree.addContent(div);
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(div);
|
||||
body.add(htmlTree);
|
||||
mdlgen.printHtmlDocument(
|
||||
configuration.metakeywords.getMetaKeywordsForModule(moduleElement),
|
||||
"module summary (frame)",
|
||||
@ -172,7 +172,7 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
|
||||
if (!printedHeader) {
|
||||
Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING,
|
||||
true, labelContent);
|
||||
htmlTree.addContent(heading);
|
||||
htmlTree.add(heading);
|
||||
printedHeader = true;
|
||||
}
|
||||
Content arr_i_name = new StringContent(utils.getSimpleName(typeElement));
|
||||
@ -182,10 +182,10 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
|
||||
Content link = getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.ALL_CLASSES_FRAME, typeElement).label(arr_i_name).target("classFrame"));
|
||||
Content li = HtmlTree.LI(link);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
contentTree.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,10 +96,10 @@ public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
ul.setTitle(contents.modulesLabel);
|
||||
for (ModuleElement mdle: configuration.modules) {
|
||||
ul.addContent(getModuleLink(mdle));
|
||||
ul.add(getModuleLink(mdle));
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
main.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
main.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -122,8 +122,8 @@ public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
DocLink cFrameLink = new DocLink(docPaths.moduleSummary(mdle));
|
||||
HtmlTree anchor = HtmlTree.A(mdlLink.toString(), label);
|
||||
String onclickStr = "updateModuleFrame('" + mtFrameLink + "','" + cFrameLink + "');";
|
||||
anchor.addAttr(HtmlAttr.TARGET, target);
|
||||
anchor.addAttr(HtmlAttr.ONCLICK, onclickStr);
|
||||
anchor.put(HtmlAttr.TARGET, target);
|
||||
anchor.put(HtmlAttr.ONCLICK, onclickStr);
|
||||
return anchor;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
if (!headerContent.isEmpty()) {
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.bar, new RawHtml(replaceDocRootDir(headerContent)));
|
||||
header.addContent(heading);
|
||||
header.add(heading);
|
||||
moduleListHeading = Headings.IndexFrames.MODULE_HEADING;
|
||||
} else {
|
||||
moduleListHeading = Headings.PAGE_TITLE_HEADING;
|
||||
@ -159,7 +159,7 @@ public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content linkContent = links.createLink(DocPaths.ALLCLASSES_FRAME,
|
||||
contents.allClassesLabel, "", "packageFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -172,7 +172,7 @@ public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content linkContent = links.createLink(DocPaths.OVERVIEW_FRAME,
|
||||
contents.allPackagesLabel, "", "packageListFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -180,7 +180,7 @@ public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
*/
|
||||
protected void addNavigationBarFooter(Content footer) {
|
||||
Content p = HtmlTree.P(Contents.SPACE);
|
||||
footer.addContent(p);
|
||||
footer.add(p);
|
||||
}
|
||||
|
||||
protected void addModulePackagesList(Map<ModuleElement, Set<PackageElement>> modules, String text,
|
||||
|
@ -102,8 +102,8 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
|
||||
if (configuration.showModules) {
|
||||
addAllModulesLink(ul);
|
||||
}
|
||||
htmltree.addContent(ul);
|
||||
header.addContent(htmltree);
|
||||
htmltree.add(ul);
|
||||
header.add(htmltree);
|
||||
addModulesList(main);
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
|
||||
}
|
||||
|
||||
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table.toContent());
|
||||
main.addContent(div);
|
||||
main.add(div);
|
||||
|
||||
if (table.needsScript()) {
|
||||
mainBodyScript.append(table.getScript());
|
||||
@ -170,7 +170,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.contentContainer);
|
||||
addOverviewComment(div);
|
||||
main.addContent(div);
|
||||
main.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
|
||||
protected void addNavigationBarHeader(Content header) {
|
||||
addTop(header);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
header.addContent(navBar.getContent(true));
|
||||
header.add(navBar.getContent(true));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,7 +210,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
|
||||
@Override
|
||||
protected void addNavigationBarFooter(Content footer) {
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
}
|
||||
|
||||
|
@ -96,19 +96,19 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content profNameContent = new StringContent(mdle.getQualifiedName().toString());
|
||||
Content heading = HtmlTree.HEADING(modulePackagesListHeading, true,
|
||||
getTargetModuleLink("classFrame", profNameContent, mdle));
|
||||
heading.addContent(Contents.SPACE);
|
||||
heading.addContent(contents.packagesLabel);
|
||||
heading.add(Contents.SPACE);
|
||||
heading.add(contents.packagesLabel);
|
||||
HtmlTree htmlTree = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
ul.setTitle(contents.packagesLabel);
|
||||
List<PackageElement> packages = new ArrayList<>(modules.get(mdle));
|
||||
for (PackageElement pkg : packages) {
|
||||
if ((!(configuration.nodeprecated && utils.isDeprecated(pkg)))) {
|
||||
ul.addContent(getPackage(pkg, mdle));
|
||||
ul.add(getPackage(pkg, mdle));
|
||||
}
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
main.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
main.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -119,19 +119,19 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content moduleNameContent = new StringContent(mdle.getQualifiedName().toString());
|
||||
Content heading = HtmlTree.HEADING(modulePackagesListHeading, true,
|
||||
getTargetModuleLink("classFrame", moduleNameContent, mdle));
|
||||
heading.addContent(Contents.SPACE);
|
||||
heading.addContent(contents.packagesLabel);
|
||||
heading.add(Contents.SPACE);
|
||||
heading.add(contents.packagesLabel);
|
||||
HtmlTree htmlTree = HtmlTree.MAIN(HtmlStyle.indexContainer, heading);
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
ul.setTitle(contents.packagesLabel);
|
||||
Set<PackageElement> modulePackages = configuration.modulePackages.get(mdle);
|
||||
for (PackageElement pkg: modulePackages) {
|
||||
if ((!(configuration.nodeprecated && utils.isDeprecated(pkg)))) {
|
||||
ul.addContent(getPackage(pkg, mdle));
|
||||
ul.add(getPackage(pkg, mdle));
|
||||
}
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
body.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -167,7 +167,7 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
if (!headerContent.isEmpty()) {
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.bar, new RawHtml(replaceDocRootDir(headerContent)));
|
||||
header.addContent(heading);
|
||||
header.add(heading);
|
||||
modulePackagesListHeading = Headings.IndexFrames.PACKAGE_HEADING;
|
||||
} else {
|
||||
modulePackagesListHeading = Headings.PAGE_TITLE_HEADING;
|
||||
@ -200,7 +200,7 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content linkContent = links.createLink(allClassesFrame,
|
||||
contents.allClassesLabel, "", "packageFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,7 +216,7 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content linkContent = links.createLink(overviewFrame,
|
||||
contents.allPackagesLabel, "", "packageListFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -232,7 +232,7 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
Content linkContent = links.createLink(moduleOverviewFrame,
|
||||
contents.allModulesLabel, "", "packageListFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -240,6 +240,6 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
|
||||
*/
|
||||
protected void addNavigationBarFooter(Content footer) {
|
||||
Content p = HtmlTree.P(Contents.SPACE);
|
||||
footer.addContent(p);
|
||||
footer.add(p);
|
||||
}
|
||||
}
|
||||
|
@ -203,22 +203,22 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
|| display(indirectOpenPackages));
|
||||
navBar.setDisplaySummaryServicesLink(displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees));
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.header);
|
||||
Content annotationContent = new HtmlTree(HtmlTag.P);
|
||||
addAnnotationInfo(mdle, annotationContent);
|
||||
div.addContent(annotationContent);
|
||||
div.add(annotationContent);
|
||||
Content label = mdle.isOpen() && (configuration.docEnv.getModuleMode() == ModuleMode.ALL)
|
||||
? contents.openModuleLabel : contents.moduleLabel;
|
||||
Content tHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, label);
|
||||
tHeading.addContent(Contents.SPACE);
|
||||
tHeading.add(Contents.SPACE);
|
||||
Content moduleHead = new RawHtml(heading);
|
||||
tHeading.addContent(moduleHead);
|
||||
div.addContent(tHeading);
|
||||
mainTree.addContent(div);
|
||||
tHeading.add(moduleHead);
|
||||
div.add(tHeading);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -458,9 +458,9 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
*/
|
||||
public void addSummaryHeader(Content startMarker, SectionName markerAnchor, Content heading,
|
||||
Content htmltree) {
|
||||
htmltree.addContent(startMarker);
|
||||
htmltree.addContent(links.createAnchor(markerAnchor));
|
||||
htmltree.addContent(HtmlTree.HEADING(Headings.ModuleDeclaration.SUMMARY_HEADING, heading));
|
||||
htmltree.add(startMarker);
|
||||
htmltree.add(links.createAnchor(markerAnchor));
|
||||
htmltree.add(HtmlTree.HEADING(Headings.ModuleDeclaration.SUMMARY_HEADING, heading));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -519,7 +519,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
Table table = getTable3(caption, tableSummary, HtmlStyle.requiresSummary,
|
||||
requiresTableHeader);
|
||||
addModulesList(requires, table);
|
||||
li.addContent(table.toContent());
|
||||
li.add(table.toContent());
|
||||
}
|
||||
// Display indirect modules table in both "api" and "all" mode.
|
||||
if (display(indirectModules)) {
|
||||
@ -531,10 +531,10 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
Table amrTable = getTable3(amrCaption, amrTableSummary, HtmlStyle.requiresSummary,
|
||||
requiresTableHeader);
|
||||
addModulesList(indirectModules, amrTable);
|
||||
li.addContent(amrTable.toContent());
|
||||
li.add(amrTable.toContent());
|
||||
}
|
||||
HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, li);
|
||||
summaryContentTree.addContent(ul);
|
||||
summaryContentTree.add(ul);
|
||||
}
|
||||
}
|
||||
|
||||
@ -572,17 +572,17 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
Table aepTable = getTable2(new StringContent(aepText),
|
||||
HtmlStyle.packagesSummary, indirectPackagesHeader);
|
||||
addIndirectPackages(aepTable, indirectPackages);
|
||||
li.addContent(aepTable.toContent());
|
||||
li.add(aepTable.toContent());
|
||||
}
|
||||
if (display(indirectOpenPackages)) {
|
||||
String aopText = resources.getText("doclet.Indirect_Opens_Summary");
|
||||
Table aopTable = getTable2(new StringContent(aopText), HtmlStyle.packagesSummary,
|
||||
indirectPackagesHeader);
|
||||
addIndirectPackages(aopTable, indirectOpenPackages);
|
||||
li.addContent(aopTable.toContent());
|
||||
li.add(aopTable.toContent());
|
||||
}
|
||||
HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, li);
|
||||
summaryContentTree.addContent(ul);
|
||||
summaryContentTree.add(ul);
|
||||
}
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
table.addRow(pkg, row);
|
||||
}
|
||||
|
||||
li.addContent(table.toContent());
|
||||
li.add(table.toContent());
|
||||
if (table.needsScript()) {
|
||||
mainBodyScript.append(table.getScript());
|
||||
}
|
||||
@ -697,9 +697,9 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
Content list = new ContentBuilder();
|
||||
for (ModuleElement m : modules) {
|
||||
if (!list.isEmpty()) {
|
||||
list.addContent(new StringContent(", "));
|
||||
list.add(new StringContent(", "));
|
||||
}
|
||||
list.addContent(getModuleLink(m, new StringContent(m.getQualifiedName())));
|
||||
list.add(getModuleLink(m, new StringContent(m.getQualifiedName())));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@ -719,8 +719,8 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
Content list = new ContentBuilder();
|
||||
String sep = "";
|
||||
for (PackageElement pkg : pkgList) {
|
||||
list.addContent(sep);
|
||||
list.addContent(getPackageLink(pkg, new StringContent(utils.getPackageName(pkg))));
|
||||
list.add(sep);
|
||||
list.add(getPackageLink(pkg, new StringContent(utils.getPackageName(pkg))));
|
||||
sep = " ";
|
||||
}
|
||||
table.addRow(moduleLinkContent, list);
|
||||
@ -749,7 +749,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
usesProvidesTableHeader);
|
||||
addProvidesList(table);
|
||||
if (!table.isEmpty()) {
|
||||
li.addContent(table.toContent());
|
||||
li.add(table.toContent());
|
||||
}
|
||||
}
|
||||
if (haveUses){
|
||||
@ -758,11 +758,11 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
usesProvidesTableHeader);
|
||||
addUsesList(table);
|
||||
if (!table.isEmpty()) {
|
||||
li.addContent(table.toContent());
|
||||
li.add(table.toContent());
|
||||
}
|
||||
}
|
||||
HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, li);
|
||||
summaryContentTree.addContent(ul);
|
||||
summaryContentTree.add(ul);
|
||||
}
|
||||
}
|
||||
|
||||
@ -783,12 +783,12 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
if (display(usesTrees)) {
|
||||
description = usesTrees.get(t);
|
||||
if (description != null && !description.isEmpty()) {
|
||||
summary.addContent(HtmlTree.DIV(HtmlStyle.block, description));
|
||||
summary.add(HtmlTree.DIV(HtmlStyle.block, description));
|
||||
} else {
|
||||
addSummaryComment(t, summary);
|
||||
}
|
||||
} else {
|
||||
summary.addContent(Contents.SPACE);
|
||||
summary.add(Contents.SPACE);
|
||||
}
|
||||
table.addRow(typeLinkContent, summary);
|
||||
}
|
||||
@ -812,26 +812,26 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
Content desc = new ContentBuilder();
|
||||
if (display(providesTrees)) {
|
||||
description = providesTrees.get(srv);
|
||||
desc.addContent((description != null && !description.isEmpty())
|
||||
desc.add((description != null && !description.isEmpty())
|
||||
? HtmlTree.DIV(HtmlStyle.block, description)
|
||||
: Contents.SPACE);
|
||||
} else {
|
||||
desc.addContent(Contents.SPACE);
|
||||
desc.add(Contents.SPACE);
|
||||
}
|
||||
// Only display the implementation details in the "all" mode.
|
||||
if (moduleMode == ModuleMode.ALL && !implSet.isEmpty()) {
|
||||
desc.addContent(new HtmlTree(HtmlTag.BR));
|
||||
desc.addContent("(");
|
||||
desc.add(new HtmlTree(HtmlTag.BR));
|
||||
desc.add("(");
|
||||
HtmlTree implSpan = HtmlTree.SPAN(HtmlStyle.implementationLabel, contents.implementation);
|
||||
desc.addContent(implSpan);
|
||||
desc.addContent(Contents.SPACE);
|
||||
desc.add(implSpan);
|
||||
desc.add(Contents.SPACE);
|
||||
String sep = "";
|
||||
for (TypeElement impl : implSet) {
|
||||
desc.addContent(sep);
|
||||
desc.addContent(getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.PACKAGE, impl)));
|
||||
desc.add(sep);
|
||||
desc.add(getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.PACKAGE, impl)));
|
||||
sep = ", ";
|
||||
}
|
||||
desc.addContent(")");
|
||||
desc.add(")");
|
||||
}
|
||||
table.addRow(srvLinkContent, desc);
|
||||
}
|
||||
@ -849,14 +849,14 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
|
||||
deprDiv.setStyle(HtmlStyle.deprecationBlock);
|
||||
Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(mdle));
|
||||
deprDiv.addContent(deprPhrase);
|
||||
deprDiv.add(deprPhrase);
|
||||
if (!deprs.isEmpty()) {
|
||||
List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
|
||||
if (!commentTags.isEmpty()) {
|
||||
addInlineDeprecatedComment(mdle, deprs.get(0), deprDiv);
|
||||
}
|
||||
}
|
||||
div.addContent(deprDiv);
|
||||
div.add(deprDiv);
|
||||
}
|
||||
}
|
||||
|
||||
@ -868,10 +868,10 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
if (!utils.getFullBody(mdle).isEmpty()) {
|
||||
Content tree = HtmlTree.SECTION();
|
||||
addDeprecationInfo(tree);
|
||||
tree.addContent(MarkerComments.START_OF_MODULE_DESCRIPTION);
|
||||
tree.addContent(links.createAnchor(SectionName.MODULE_DESCRIPTION));
|
||||
tree.add(MarkerComments.START_OF_MODULE_DESCRIPTION);
|
||||
tree.add(links.createAnchor(SectionName.MODULE_DESCRIPTION));
|
||||
addInlineComment(mdle, tree);
|
||||
moduleContentTree.addContent(tree);
|
||||
moduleContentTree.add(tree);
|
||||
}
|
||||
}
|
||||
|
||||
@ -882,7 +882,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
public void addModuleTags(Content moduleContentTree) {
|
||||
Content tree = HtmlTree.SECTION();
|
||||
addTagsInfo(mdle, tree);
|
||||
moduleContentTree.addContent(tree);
|
||||
moduleContentTree.add(tree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -890,8 +890,8 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
*/
|
||||
@Override
|
||||
public void addModuleContent(Content contentTree, Content moduleContentTree) {
|
||||
mainTree.addContent(moduleContentTree);
|
||||
contentTree.addContent(mainTree);
|
||||
mainTree.add(moduleContentTree);
|
||||
contentTree.add(mainTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -901,9 +901,9 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
public void addModuleFooter(Content contentTree) {
|
||||
Content htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
contentTree.addContent(htmlTree);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -931,7 +931,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
|
||||
deprDiv.setStyle(HtmlStyle.deprecationBlock);
|
||||
Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(pkg));
|
||||
deprDiv.addContent(deprPhrase);
|
||||
deprDiv.add(deprPhrase);
|
||||
if (!deprs.isEmpty()) {
|
||||
CommentHelper ch = utils.getCommentHelper(pkg);
|
||||
List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
|
||||
@ -939,7 +939,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
|
||||
addInlineDeprecatedComment(pkg, deprs.get(0), deprDiv);
|
||||
}
|
||||
}
|
||||
li.addContent(deprDiv);
|
||||
li.add(deprDiv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement,
|
||||
Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(MarkerComments.START_OF_NESTED_CLASS_SUMMARY);
|
||||
memberSummaryTree.add(MarkerComments.START_OF_NESTED_CLASS_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
return memberTree;
|
||||
@ -91,7 +91,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.nestedClassSummary);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -122,7 +122,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(
|
||||
memberTree.add(links.createAnchor(
|
||||
SectionName.NESTED_CLASS_SUMMARY));
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
|
||||
inheritedTree.addContent(links.createAnchor(
|
||||
inheritedTree.add(links.createAnchor(
|
||||
SectionName.NESTED_CLASSES_INHERITANCE,
|
||||
utils.getFullyQualifiedName(typeElement)));
|
||||
}
|
||||
@ -154,9 +154,9 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
: resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class"));
|
||||
}
|
||||
Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, label);
|
||||
labelHeading.addContent(Contents.SPACE);
|
||||
labelHeading.addContent(classLink);
|
||||
inheritedTree.addContent(labelHeading);
|
||||
labelHeading.add(Contents.SPACE);
|
||||
labelHeading.add(classLink);
|
||||
inheritedTree.add(labelHeading);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -168,7 +168,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
|
||||
writer.getLink(new LinkInfoImpl(configuration, context, (TypeElement)member)));
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,7 +176,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
|
||||
linksTree.addContent(
|
||||
linksTree.add(
|
||||
writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
|
||||
(TypeElement)member)));
|
||||
}
|
||||
|
@ -103,12 +103,12 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
||||
HtmlTree htmlTree = HtmlTree.MAIN();
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.bar,
|
||||
packgen.getTargetPackageLink(packageElement, "classFrame", pkgNameContent));
|
||||
htmlTree.addContent(heading);
|
||||
htmlTree.add(heading);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.indexContainer);
|
||||
packgen.addClassListing(div);
|
||||
htmlTree.addContent(div);
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(div);
|
||||
body.add(htmlTree);
|
||||
packgen.printHtmlDocument(
|
||||
configuration.metakeywords.getMetaKeywords(packageElement),
|
||||
getDescription("package summary (frame)", packageElement),
|
||||
@ -178,7 +178,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
||||
if (!printedHeader) {
|
||||
Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING,
|
||||
true, labelContent);
|
||||
htmlTree.addContent(heading);
|
||||
htmlTree.add(heading);
|
||||
printedHeader = true;
|
||||
}
|
||||
Content arr_i_name = new StringContent(utils.getSimpleName(typeElement));
|
||||
@ -187,10 +187,10 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
||||
Content link = getLink(new LinkInfoImpl(configuration,
|
||||
LinkInfoImpl.Kind.PACKAGE_FRAME, typeElement).label(arr_i_name).target("classFrame"));
|
||||
Content li = HtmlTree.LI(link);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
contentTree.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,11 +94,11 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
// package is marked as deprecated.
|
||||
if (aPackage != null &&
|
||||
(!(configuration.nodeprecated && utils.isDeprecated(aPackage)))) {
|
||||
ul.addContent(getPackage(aPackage));
|
||||
ul.add(getPackage(aPackage));
|
||||
}
|
||||
}
|
||||
htmlTree.addContent(ul);
|
||||
main.addContent(htmlTree);
|
||||
htmlTree.add(ul);
|
||||
main.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -138,7 +138,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
if (!headerContent.isEmpty()) {
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.bar, headerContent);
|
||||
header.addContent(heading);
|
||||
header.add(heading);
|
||||
packageListHeading = Headings.IndexFrames.PACKAGE_HEADING;
|
||||
} else {
|
||||
packageListHeading = Headings.PAGE_TITLE_HEADING;
|
||||
@ -163,7 +163,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
Content linkContent = links.createLink(DocPaths.ALLCLASSES_FRAME,
|
||||
contents.allClassesLabel, "", "packageFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -177,7 +177,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
Content linkContent = links.createLink(DocPaths.MODULE_OVERVIEW_FRAME,
|
||||
contents.allModulesLabel, "", "packageListFrame");
|
||||
Content li = HtmlTree.LI(linkContent);
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -186,6 +186,6 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
@Override
|
||||
protected void addNavigationBarFooter(Content footer) {
|
||||
Content p = HtmlTree.P(Contents.SPACE);
|
||||
footer.addContent(p);
|
||||
footer.add(p);
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
}
|
||||
|
||||
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table.toContent());
|
||||
main.addContent(div);
|
||||
main.add(div);
|
||||
|
||||
if (table.needsScript()) {
|
||||
getMainBodyScript().append(table.getScript());
|
||||
@ -151,7 +151,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.contentContainer);
|
||||
addOverviewComment(div);
|
||||
main.addContent(div);
|
||||
main.add(div);
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
protected void addNavigationBarHeader(Content header) {
|
||||
addTop(header);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
header.addContent(navBar.getContent(true));
|
||||
header.add(navBar.getContent(true));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -191,7 +191,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
@Override
|
||||
protected void addNavigationBarFooter(Content footer) {
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
}
|
||||
}
|
||||
|
@ -106,20 +106,20 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
||||
if (configuration.packages.size() > 1) {
|
||||
addLinkToMainTree(div);
|
||||
}
|
||||
mainTree.addContent(div);
|
||||
mainTree.add(div);
|
||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||
divTree.setStyle(HtmlStyle.contentContainer);
|
||||
addTree(classtree.baseClasses(), "doclet.Class_Hierarchy", divTree);
|
||||
addTree(classtree.baseInterfaces(), "doclet.Interface_Hierarchy", divTree);
|
||||
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
|
||||
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree, true);
|
||||
mainTree.addContent(divTree);
|
||||
body.addContent(mainTree);
|
||||
mainTree.add(divTree);
|
||||
body.add(mainTree);
|
||||
HtmlTree footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
body.addContent(footer);
|
||||
body.add(footer);
|
||||
printHtmlDocument(null, getDescription("tree", packageElement), body);
|
||||
}
|
||||
|
||||
@ -138,8 +138,8 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
||||
contents.moduleLabel);
|
||||
navBar.setNavLinkModule(linkContent);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -151,10 +151,10 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
||||
protected void addLinkToMainTree(Content div) {
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
|
||||
contents.packageHierarchies);
|
||||
div.addContent(span);
|
||||
div.add(span);
|
||||
HtmlTree ul = new HtmlTree (HtmlTag.UL);
|
||||
ul.setStyle(HtmlStyle.horizontal);
|
||||
ul.addContent(getNavLinkMainTree(resources.getText("doclet.All_Packages")));
|
||||
div.addContent(ul);
|
||||
ul.add(getNavLinkMainTree(resources.getText("doclet.All_Packages")));
|
||||
div.add(ul);
|
||||
}
|
||||
}
|
||||
|
@ -129,17 +129,17 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.contentContainer);
|
||||
if (usingPackageToUsedClasses.isEmpty()) {
|
||||
div.addContent(contents.getContent("doclet.ClassUse_No.usage.of.0", utils.getPackageName(packageElement)));
|
||||
div.add(contents.getContent("doclet.ClassUse_No.usage.of.0", utils.getPackageName(packageElement)));
|
||||
} else {
|
||||
addPackageUse(div);
|
||||
}
|
||||
mainTree.addContent(div);
|
||||
body.addContent(mainTree);
|
||||
mainTree.add(div);
|
||||
body.add(mainTree);
|
||||
HtmlTree footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
body.addContent(footer);
|
||||
body.add(footer);
|
||||
printHtmlDocument(null,
|
||||
getDescription("use", packageElement),
|
||||
body);
|
||||
@ -157,7 +157,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
addPackageList(ul);
|
||||
}
|
||||
addClassList(ul);
|
||||
contentTree.addContent(ul);
|
||||
contentTree.add(ul);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -181,12 +181,12 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
if (pkg != null && !pkg.isUnnamed()) {
|
||||
addSummaryComment(pkg, summary);
|
||||
} else {
|
||||
summary.addContent(Contents.SPACE);
|
||||
summary.add(Contents.SPACE);
|
||||
}
|
||||
table.addRow(packageLink, summary);
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
contentTree.addContent(li);
|
||||
contentTree.add(li);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -201,7 +201,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
PackageElement usingPackage = utils.elementUtils.getPackageElement(packageName);
|
||||
HtmlTree li = new HtmlTree(HtmlTag.LI);
|
||||
li.setStyle(HtmlStyle.blockList);
|
||||
li.addContent(links.createAnchor(getPackageAnchorName(usingPackage)));
|
||||
li.add(links.createAnchor(getPackageAnchorName(usingPackage)));
|
||||
String tableSummary = resources.getText("doclet.Use_Table_Summary",
|
||||
resources.getText("doclet.classes"));
|
||||
Content caption = contents.getContent(
|
||||
@ -223,8 +223,8 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
|
||||
table.addRow(typeContent, summary);
|
||||
}
|
||||
li.addContent(table.toContent());
|
||||
contentTree.addContent(li);
|
||||
li.add(table.toContent());
|
||||
contentTree.add(li);
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,16 +244,16 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
contents.moduleLabel);
|
||||
navBar.setNavLinkModule(linkContent);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
ContentBuilder headContent = new ContentBuilder();
|
||||
headContent.addContent(contents.getContent("doclet.ClassUse_Title", packageText));
|
||||
headContent.addContent(new HtmlTree(HtmlTag.BR));
|
||||
headContent.addContent(name);
|
||||
headContent.add(contents.getContent("doclet.ClassUse_Title", packageText));
|
||||
headContent.add(new HtmlTree(HtmlTag.BR));
|
||||
headContent.add(name);
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, headContent);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
mainTree.addContent(div);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
}
|
||||
|
@ -112,29 +112,29 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
contents.moduleLabel);
|
||||
navBar.setNavLinkModule(linkContent);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||
div.setStyle(HtmlStyle.header);
|
||||
if (configuration.showModules) {
|
||||
ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(packageElement);
|
||||
Content classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInPackage, contents.moduleLabel);
|
||||
Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel);
|
||||
moduleNameDiv.addContent(Contents.SPACE);
|
||||
moduleNameDiv.addContent(getModuleLink(mdle,
|
||||
moduleNameDiv.add(Contents.SPACE);
|
||||
moduleNameDiv.add(getModuleLink(mdle,
|
||||
new StringContent(mdle.getQualifiedName().toString())));
|
||||
div.addContent(moduleNameDiv);
|
||||
div.add(moduleNameDiv);
|
||||
}
|
||||
Content annotationContent = new HtmlTree(HtmlTag.P);
|
||||
addAnnotationInfo(packageElement, annotationContent);
|
||||
div.addContent(annotationContent);
|
||||
div.add(annotationContent);
|
||||
Content tHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, contents.packageLabel);
|
||||
tHeading.addContent(Contents.SPACE);
|
||||
tHeading.add(Contents.SPACE);
|
||||
Content packageHead = new StringContent(heading);
|
||||
tHeading.addContent(packageHead);
|
||||
div.addContent(tHeading);
|
||||
mainTree.addContent(div);
|
||||
tHeading.add(packageHead);
|
||||
div.add(tHeading);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -160,14 +160,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
|
||||
deprDiv.setStyle(HtmlStyle.deprecationBlock);
|
||||
Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(packageElement));
|
||||
deprDiv.addContent(deprPhrase);
|
||||
deprDiv.add(deprPhrase);
|
||||
if (!deprs.isEmpty()) {
|
||||
List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
|
||||
if (!commentTags.isEmpty()) {
|
||||
addInlineDeprecatedComment(packageElement, deprs.get(0), deprDiv);
|
||||
}
|
||||
}
|
||||
div.addContent(deprDiv);
|
||||
div.add(deprDiv);
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
configuration, LinkInfoImpl.Kind.PACKAGE, klass));
|
||||
ContentBuilder description = new ContentBuilder();
|
||||
if (utils.isDeprecated(klass)) {
|
||||
description.addContent(getDeprecatedPhrase(klass));
|
||||
description.add(getDeprecatedPhrase(klass));
|
||||
List<? extends DocTree> tags = utils.getDeprecatedTrees(klass);
|
||||
if (!tags.isEmpty()) {
|
||||
addSummaryDeprecatedComment(klass, tags.get(0), description);
|
||||
@ -262,7 +262,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
table.addRow(classLink, description);
|
||||
}
|
||||
Content li = HtmlTree.LI(HtmlStyle.blockList, table.toContent());
|
||||
summaryContentTree.addContent(li);
|
||||
summaryContentTree.add(li);
|
||||
}
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
public void addPackageDescription(Content packageContentTree) {
|
||||
if (!utils.getBody(packageElement).isEmpty()) {
|
||||
Content tree = sectionTree;
|
||||
tree.addContent(links.createAnchor(SectionName.PACKAGE_DESCRIPTION));
|
||||
tree.add(links.createAnchor(SectionName.PACKAGE_DESCRIPTION));
|
||||
addDeprecationInfo(tree);
|
||||
addInlineComment(packageElement, tree);
|
||||
}
|
||||
@ -286,7 +286,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
public void addPackageTags(Content packageContentTree) {
|
||||
Content htmlTree = sectionTree;
|
||||
addTagsInfo(packageElement, htmlTree);
|
||||
packageContentTree.addContent(sectionTree);
|
||||
packageContentTree.add(sectionTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -294,8 +294,8 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
*/
|
||||
@Override
|
||||
public void addPackageContent(Content contentTree, Content packageContentTree) {
|
||||
mainTree.addContent(packageContentTree);
|
||||
contentTree.addContent(mainTree);
|
||||
mainTree.add(packageContentTree);
|
||||
contentTree.add(mainTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -305,9 +305,9 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
public void addPackageFooter(Content contentTree) {
|
||||
Content htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
contentTree.addContent(htmlTree);
|
||||
contentTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
|
||||
memberSummaryTree.addContent(MarkerComments.START_OF_PROPERTY_SUMMARY);
|
||||
memberSummaryTree.add(MarkerComments.START_OF_PROPERTY_SUMMARY);
|
||||
Content memberTree = writer.getMemberTreeHeader();
|
||||
writer.addSummaryHeader(this, typeElement, memberTree);
|
||||
return memberTree;
|
||||
@ -87,12 +87,12 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getPropertyDetailsTreeHeader(TypeElement typeElement,
|
||||
Content memberDetailsTree) {
|
||||
memberDetailsTree.addContent(MarkerComments.START_OF_PROPERTY_DETAILS);
|
||||
memberDetailsTree.add(MarkerComments.START_OF_PROPERTY_DETAILS);
|
||||
Content propertyDetailsTree = writer.getMemberTreeHeader();
|
||||
propertyDetailsTree.addContent(links.createAnchor(SectionName.PROPERTY_DETAIL));
|
||||
propertyDetailsTree.add(links.createAnchor(SectionName.PROPERTY_DETAIL));
|
||||
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
|
||||
contents.propertyDetailsLabel);
|
||||
propertyDetailsTree.addContent(heading);
|
||||
propertyDetailsTree.add(heading);
|
||||
return propertyDetailsTree;
|
||||
}
|
||||
|
||||
@ -102,11 +102,11 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
@Override
|
||||
public Content getPropertyDocTreeHeader(ExecutableElement property,
|
||||
Content propertyDetailsTree) {
|
||||
propertyDetailsTree.addContent(links.createAnchor(name(property)));
|
||||
propertyDetailsTree.add(links.createAnchor(name(property)));
|
||||
Content propertyDocTree = writer.getMemberTreeHeader();
|
||||
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
|
||||
heading.addContent(utils.getPropertyLabel(name(property)));
|
||||
propertyDocTree.addContent(heading);
|
||||
heading.add(utils.getPropertyLabel(name(property)));
|
||||
propertyDocTree.add(heading);
|
||||
return propertyDocTree;
|
||||
}
|
||||
|
||||
@ -121,8 +121,8 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
Content propertylink = writer.getLink(new LinkInfoImpl(
|
||||
configuration, LinkInfoImpl.Kind.MEMBER,
|
||||
utils.getReturnType(property)));
|
||||
pre.addContent(propertylink);
|
||||
pre.addContent(" ");
|
||||
pre.add(propertylink);
|
||||
pre.add(" ");
|
||||
if (configuration.linksource) {
|
||||
Content propertyName = new StringContent(name(property));
|
||||
writer.addSrcLink(property, propertyName, pre);
|
||||
@ -161,9 +161,9 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
utils.isClass(holder)
|
||||
? contents.descfrmClassLabel
|
||||
: contents.descfrmInterfaceLabel);
|
||||
descfrmLabel.addContent(Contents.SPACE);
|
||||
descfrmLabel.addContent(codeLink);
|
||||
propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
|
||||
descfrmLabel.add(Contents.SPACE);
|
||||
descfrmLabel.add(codeLink);
|
||||
propertyDocTree.add(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
|
||||
writer.addInlineComment(property, propertyDocTree);
|
||||
}
|
||||
}
|
||||
@ -201,7 +201,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
public void addSummaryLabel(Content memberTree) {
|
||||
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
|
||||
contents.propertySummaryLabel);
|
||||
memberTree.addContent(label);
|
||||
memberTree.add(label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -230,7 +230,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
|
||||
memberTree.addContent(links.createAnchor(SectionName.PROPERTY_SUMMARY));
|
||||
memberTree.add(links.createAnchor(SectionName.PROPERTY_SUMMARY));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -238,7 +238,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
*/
|
||||
@Override
|
||||
public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
|
||||
inheritedTree.addContent(links.createAnchor(
|
||||
inheritedTree.add(links.createAnchor(
|
||||
SectionName.PROPERTIES_INHERITANCE,
|
||||
configuration.getClassName(typeElement)));
|
||||
}
|
||||
@ -262,9 +262,9 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
}
|
||||
Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING,
|
||||
label);
|
||||
labelHeading.addContent(Contents.SPACE);
|
||||
labelHeading.addContent(classLink);
|
||||
inheritedTree.addContent(labelHeading);
|
||||
labelHeading.add(Contents.SPACE);
|
||||
labelHeading.add(classLink);
|
||||
inheritedTree.add(labelHeading);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -281,7 +281,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
true));
|
||||
|
||||
Content code = HtmlTree.CODE(memberLink);
|
||||
tdSummary.addContent(code);
|
||||
tdSummary.add(code);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -293,7 +293,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
||||
Content content = writer.getDocLink(LinkInfoImpl.Kind.MEMBER, typeElement, member,
|
||||
utils.isProperty(mname) ? utils.getPropertyName(mname) : mname,
|
||||
false, true);
|
||||
linksTree.addContent(content);
|
||||
linksTree.add(content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,13 +82,13 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
HtmlTree htmlTree = HtmlTree.HEADER();
|
||||
addTop(htmlTree);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
Content h1Content = new StringContent(header);
|
||||
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
|
||||
HtmlStyle.title, h1Content);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
mainTree.addContent(div);
|
||||
mainTree.add(div);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
@ -121,8 +121,8 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
public Content getPackageHeader(String packageName) {
|
||||
Content heading = HtmlTree.HEADING(Headings.SerializedForm.PACKAGE_HEADING, true,
|
||||
contents.packageLabel);
|
||||
heading.addContent(Contents.SPACE);
|
||||
heading.addContent(packageName);
|
||||
heading.add(Contents.SPACE);
|
||||
heading.add(packageName);
|
||||
return heading;
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
contents.getContent(
|
||||
"doclet.Class_0_extends_implements_serializable", classLink,
|
||||
superClassLink);
|
||||
li.addContent(HtmlTree.HEADING(Headings.SerializedForm.CLASS_HEADING, className));
|
||||
li.add(HtmlTree.HEADING(Headings.SerializedForm.CLASS_HEADING, className));
|
||||
return li;
|
||||
}
|
||||
|
||||
@ -198,9 +198,9 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
public void addSerialUIDInfo(String header, String serialUID,
|
||||
Content serialUidTree) {
|
||||
Content headerContent = new StringContent(header);
|
||||
serialUidTree.addContent(HtmlTree.DT(headerContent));
|
||||
serialUidTree.add(HtmlTree.DT(headerContent));
|
||||
Content serialContent = new StringContent(serialUID);
|
||||
serialUidTree.addContent(HtmlTree.DD(serialContent));
|
||||
serialUidTree.add(HtmlTree.DD(serialContent));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -223,7 +223,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
public Content getSerializedContent(Content serializedTreeContent) {
|
||||
HtmlTree divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
|
||||
serializedTreeContent);
|
||||
mainTree.addContent(divContent);
|
||||
mainTree.add(divContent);
|
||||
return mainTree;
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
*/
|
||||
public void addPackageSerializedTree(Content serializedSummariesTree,
|
||||
Content packageSerializedTree) {
|
||||
serializedSummariesTree.addContent(HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree));
|
||||
serializedSummariesTree.add(HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -243,9 +243,9 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
public void addFooter(Content serializedTree) {
|
||||
Content htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
serializedTree.addContent(htmlTree);
|
||||
serializedTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,10 +96,10 @@ public class SingleIndexWriter extends AbstractIndexWriter {
|
||||
HtmlTree header = HtmlTree.HEADER();
|
||||
addTop(header);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
header.addContent(navBar.getContent(true));
|
||||
body.addContent(header);
|
||||
header.add(navBar.getContent(true));
|
||||
body.add(header);
|
||||
HtmlTree main = HtmlTree.MAIN();
|
||||
main.addContent(HtmlTree.DIV(HtmlStyle.header,
|
||||
main.add(HtmlTree.DIV(HtmlStyle.header,
|
||||
HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
|
||||
contents.getContent("doclet.Index"))));
|
||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||
@ -118,13 +118,13 @@ public class SingleIndexWriter extends AbstractIndexWriter {
|
||||
}
|
||||
}
|
||||
addLinksForIndexes(divTree);
|
||||
main.addContent(divTree);
|
||||
body.addContent(main);
|
||||
main.add(divTree);
|
||||
body.add(main);
|
||||
HtmlTree footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
body.addContent(footer);
|
||||
body.add(footer);
|
||||
createSearchIndexFiles();
|
||||
printHtmlDocument(null, "index", body);
|
||||
}
|
||||
@ -137,17 +137,17 @@ public class SingleIndexWriter extends AbstractIndexWriter {
|
||||
protected void addLinksForIndexes(Content contentTree) {
|
||||
for (Object ch : elements) {
|
||||
String unicode = ch.toString();
|
||||
contentTree.addContent(
|
||||
contentTree.add(
|
||||
links.createLink(getNameForIndex(unicode),
|
||||
new StringContent(unicode)));
|
||||
contentTree.addContent(Contents.SPACE);
|
||||
contentTree.add(Contents.SPACE);
|
||||
}
|
||||
contentTree.addContent(new HtmlTree(HtmlTag.BR));
|
||||
contentTree.addContent(links.createLink(DocPaths.ALLCLASSES_INDEX,
|
||||
contentTree.add(new HtmlTree(HtmlTag.BR));
|
||||
contentTree.add(links.createLink(DocPaths.ALLCLASSES_INDEX,
|
||||
contents.allClassesLabel));
|
||||
if (!configuration.packages.isEmpty()) {
|
||||
contentTree.addContent(Contents.SPACE);
|
||||
contentTree.addContent(links.createLink(DocPaths.ALLPACKAGES_INDEX,
|
||||
contentTree.add(Contents.SPACE);
|
||||
contentTree.add(links.createLink(DocPaths.ALLPACKAGES_INDEX,
|
||||
contents.allPackagesLabel));
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ import javax.lang.model.element.TypeElement;
|
||||
import javax.tools.FileObject;
|
||||
|
||||
import jdk.javadoc.doclet.DocletEnvironment;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.DocType;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
|
||||
@ -196,7 +195,7 @@ public class SourceToHTMLConverter {
|
||||
}
|
||||
addBlankLines(pre);
|
||||
Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
|
||||
body.addContent(HtmlTree.MAIN(div));
|
||||
body.add(HtmlTree.MAIN(div));
|
||||
writeToFile(body, outputdir.resolve(configuration.docPaths.forClass(te)), te);
|
||||
} catch (IOException e) {
|
||||
String message = resources.getText("doclet.exception.read.file", fo.getName());
|
||||
@ -242,7 +241,7 @@ public class SourceToHTMLConverter {
|
||||
}
|
||||
DocPath p = relativePath.resolve(stylesheet);
|
||||
HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style");
|
||||
head.addContent(link);
|
||||
head.add(link);
|
||||
addStylesheets(head);
|
||||
}
|
||||
|
||||
@ -254,7 +253,7 @@ public class SourceToHTMLConverter {
|
||||
DocPath ssheetPath = DocPath.create(file.getName());
|
||||
HtmlTree slink = HtmlTree.LINK("stylesheet", "text/css", relativePath.resolve(ssheetPath).getPath(),
|
||||
"Style");
|
||||
tree.addContent(slink);
|
||||
tree.add(slink);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -265,7 +264,7 @@ public class SourceToHTMLConverter {
|
||||
* @return the header content for the HTML file
|
||||
*/
|
||||
private static Content getHeader() {
|
||||
return new HtmlTree(HtmlTag.BODY).addAttr(HtmlAttr.CLASS, "source");
|
||||
return new HtmlTree(HtmlTag.BODY).put(HtmlAttr.CLASS, "source");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -278,13 +277,13 @@ public class SourceToHTMLConverter {
|
||||
HtmlTree span = new HtmlTree(HtmlTag.SPAN);
|
||||
span.setStyle(HtmlStyle.sourceLineNo);
|
||||
if (lineno < 10) {
|
||||
span.addContent("00" + Integer.toString(lineno));
|
||||
span.add("00" + Integer.toString(lineno));
|
||||
} else if (lineno < 100) {
|
||||
span.addContent("0" + Integer.toString(lineno));
|
||||
span.add("0" + Integer.toString(lineno));
|
||||
} else {
|
||||
span.addContent(Integer.toString(lineno));
|
||||
span.add(Integer.toString(lineno));
|
||||
}
|
||||
pre.addContent(span);
|
||||
pre.add(span);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -299,8 +298,8 @@ public class SourceToHTMLConverter {
|
||||
Content anchor = HtmlTree.A_ID(
|
||||
"line." + Integer.toString(currentLineNo),
|
||||
new StringContent(utils.replaceTabs(line)));
|
||||
pre.addContent(anchor);
|
||||
pre.addContent(NEW_LINE);
|
||||
pre.add(anchor);
|
||||
pre.add(NEW_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,7 +310,7 @@ public class SourceToHTMLConverter {
|
||||
*/
|
||||
private static void addBlankLines(Content pre) {
|
||||
for (int i = 0; i < NUM_BLANK_LINES; i++) {
|
||||
pre.addContent(NEW_LINE);
|
||||
pre.add(NEW_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,10 +124,10 @@ public class SplitIndexWriter extends AbstractIndexWriter {
|
||||
HtmlTree header = HtmlTree.HEADER();
|
||||
addTop(header);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
header.addContent(navBar.getContent(true));
|
||||
body.addContent(header);
|
||||
header.add(navBar.getContent(true));
|
||||
body.add(header);
|
||||
HtmlTree main = HtmlTree.MAIN();
|
||||
main.addContent(HtmlTree.DIV(HtmlStyle.header,
|
||||
main.add(HtmlTree.DIV(HtmlStyle.header,
|
||||
HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
|
||||
contents.getContent("doclet.Index"))));
|
||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||
@ -142,13 +142,13 @@ public class SplitIndexWriter extends AbstractIndexWriter {
|
||||
configuration.tagSearchIndexMap.get(unicode), divTree);
|
||||
}
|
||||
addLinksForIndexes(divTree);
|
||||
main.addContent(divTree);
|
||||
body.addContent(main);
|
||||
main.add(divTree);
|
||||
body.add(main);
|
||||
HtmlTree footer = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
footer.addContent(navBar.getContent(false));
|
||||
footer.add(navBar.getContent(false));
|
||||
addBottom(footer);
|
||||
body.addContent(footer);
|
||||
body.add(footer);
|
||||
String description = "index: " + unicode;
|
||||
printHtmlDocument(null, description, body);
|
||||
}
|
||||
@ -161,16 +161,16 @@ public class SplitIndexWriter extends AbstractIndexWriter {
|
||||
protected void addLinksForIndexes(Content contentTree) {
|
||||
for (int i = 0; i < indexElements.size(); i++) {
|
||||
int j = i + 1;
|
||||
contentTree.addContent(links.createLink(DocPaths.indexN(j),
|
||||
contentTree.add(links.createLink(DocPaths.indexN(j),
|
||||
new StringContent(indexElements.get(i).toString())));
|
||||
contentTree.addContent(Contents.SPACE);
|
||||
contentTree.add(Contents.SPACE);
|
||||
}
|
||||
contentTree.addContent(new HtmlTree(HtmlTag.BR));
|
||||
contentTree.addContent(links.createLink(pathToRoot.resolve(DocPaths.ALLCLASSES_INDEX),
|
||||
contentTree.add(new HtmlTree(HtmlTag.BR));
|
||||
contentTree.add(links.createLink(pathToRoot.resolve(DocPaths.ALLCLASSES_INDEX),
|
||||
contents.allClassesLabel));
|
||||
if (!configuration.packages.isEmpty()) {
|
||||
contentTree.addContent(Contents.SPACE);
|
||||
contentTree.addContent(links.createLink(pathToRoot.resolve(DocPaths.ALLPACKAGES_INDEX),
|
||||
contentTree.add(Contents.SPACE);
|
||||
contentTree.add(links.createLink(pathToRoot.resolve(DocPaths.ALLPACKAGES_INDEX),
|
||||
contents.allPackagesLabel));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -122,14 +122,14 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
if (!deprs.isEmpty()) {
|
||||
addSummaryDeprecatedComment(member, deprs.get(0), div);
|
||||
}
|
||||
tdSummary.addContent(div);
|
||||
tdSummary.add(div);
|
||||
return;
|
||||
} else {
|
||||
Element te = member.getEnclosingElement();
|
||||
if (te != null && utils.isTypeElement(te) && utils.isDeprecated(te)) {
|
||||
Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(te));
|
||||
div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
|
||||
tdSummary.addContent(div);
|
||||
tdSummary.add(div);
|
||||
}
|
||||
}
|
||||
addSummaryComment(member, firstSentenceTags, tdSummary);
|
||||
@ -172,7 +172,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
public void addInheritedMemberSummary(AbstractMemberWriter mw, TypeElement typeElement,
|
||||
Element member, boolean isFirst, Content linksTree) {
|
||||
if (! isFirst) {
|
||||
linksTree.addContent(", ");
|
||||
linksTree.add(", ");
|
||||
}
|
||||
mw.addInheritedSummaryLink(typeElement, member, linksTree);
|
||||
}
|
||||
@ -195,8 +195,8 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
* @param classContentTree class content tree which will be added to the content tree
|
||||
*/
|
||||
public void addClassContentTree(Content contentTree, Content classContentTree) {
|
||||
mainTree.addContent(classContentTree);
|
||||
contentTree.addContent(mainTree);
|
||||
mainTree.add(classContentTree);
|
||||
contentTree.add(mainTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -228,7 +228,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
*/
|
||||
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(memberTree));
|
||||
memberSummaryTree.addContent(htmlTree);
|
||||
memberSummaryTree.add(htmlTree);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,8 +28,6 @@ package jdk.javadoc.internal.doclets.formats.html;
|
||||
import java.util.List;
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.ModuleElement;
|
||||
import javax.lang.model.element.PackageElement;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.VariableElement;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
@ -140,29 +138,29 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
List<? extends DocTree> deprs = utils.getBlockTags(element, DocTree.Kind.DEPRECATED);
|
||||
if (utils.isTypeElement(element)) {
|
||||
if (utils.isDeprecated(element)) {
|
||||
result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
|
||||
result.add(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
|
||||
htmlWriter.getDeprecatedPhrase(element)));
|
||||
if (!deprs.isEmpty()) {
|
||||
List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
|
||||
if (!commentTags.isEmpty()) {
|
||||
result.addContent(commentTagsToOutput(null, element, commentTags, false));
|
||||
result.add(commentTagsToOutput(null, element, commentTags, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (utils.isDeprecated(element)) {
|
||||
result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
|
||||
result.add(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
|
||||
htmlWriter.getDeprecatedPhrase(element)));
|
||||
if (!deprs.isEmpty()) {
|
||||
List<? extends DocTree> bodyTags = ch.getBody(configuration, deprs.get(0));
|
||||
Content body = commentTagsToOutput(null, element, bodyTags, false);
|
||||
if (!body.isEmpty())
|
||||
result.addContent(HtmlTree.DIV(HtmlStyle.deprecationComment, body));
|
||||
result.add(HtmlTree.DIV(HtmlStyle.deprecationComment, body));
|
||||
}
|
||||
} else {
|
||||
Element ee = utils.getEnclosingTypeElement(element);
|
||||
if (utils.isDeprecated(ee)) {
|
||||
result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
|
||||
result.add(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
|
||||
htmlWriter.getDeprecatedPhrase(ee)));
|
||||
}
|
||||
}
|
||||
@ -194,10 +192,10 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
public Content paramTagOutput(Element element, DocTree paramTag, String paramName) {
|
||||
ContentBuilder body = new ContentBuilder();
|
||||
CommentHelper ch = utils.getCommentHelper(element);
|
||||
body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
|
||||
body.addContent(" - ");
|
||||
body.add(HtmlTree.CODE(new RawHtml(paramName)));
|
||||
body.add(" - ");
|
||||
List<? extends DocTree> description = ch.getDescription(configuration, paramTag);
|
||||
body.addContent(htmlWriter.commentTagsToContent(paramTag, element, description, false, inSummary));
|
||||
body.add(htmlWriter.commentTagsToContent(paramTag, element, description, false, inSummary));
|
||||
HtmlTree result = HtmlTree.DD(body);
|
||||
return result;
|
||||
}
|
||||
@ -208,10 +206,10 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
public Content propertyTagOutput(Element element, DocTree tag, String prefix) {
|
||||
Content body = new ContentBuilder();
|
||||
CommentHelper ch = utils.getCommentHelper(element);
|
||||
body.addContent(new RawHtml(prefix));
|
||||
body.addContent(" ");
|
||||
body.addContent(HtmlTree.CODE(new RawHtml(ch.getText(tag))));
|
||||
body.addContent(".");
|
||||
body.add(new RawHtml(prefix));
|
||||
body.add(" ");
|
||||
body.add(HtmlTree.CODE(new RawHtml(ch.getText(tag))));
|
||||
body.add(".");
|
||||
Content result = HtmlTree.P(body);
|
||||
return result;
|
||||
}
|
||||
@ -222,9 +220,9 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
public Content returnTagOutput(Element element, DocTree returnTag) {
|
||||
ContentBuilder result = new ContentBuilder();
|
||||
CommentHelper ch = utils.getCommentHelper(element);
|
||||
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
|
||||
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
|
||||
new StringContent(resources.getText("doclet.Returns")))));
|
||||
result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent(
|
||||
result.add(HtmlTree.DD(htmlWriter.commentTagsToContent(
|
||||
returnTag, element, ch.getDescription(configuration, returnTag), false, inSummary)));
|
||||
return result;
|
||||
}
|
||||
@ -236,7 +234,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
ContentBuilder body = new ContentBuilder();
|
||||
for (DocTree dt : seeTags) {
|
||||
appendSeparatorIfNotEmpty(body);
|
||||
body.addContent(htmlWriter.seeTagToContent(holder, dt));
|
||||
body.add(htmlWriter.seeTagToContent(holder, dt));
|
||||
}
|
||||
if (utils.isVariableElement(holder) && ((VariableElement)holder).getConstantValue() != null &&
|
||||
htmlWriter instanceof ClassWriterImpl) {
|
||||
@ -248,7 +246,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
((ClassWriterImpl) htmlWriter).getTypeElement().getQualifiedName() + "." +
|
||||
utils.getSimpleName(holder);
|
||||
DocLink link = constantsPath.fragment(whichConstant);
|
||||
body.addContent(htmlWriter.links.createLink(link,
|
||||
body.add(htmlWriter.links.createLink(link,
|
||||
new StringContent(resources.getText("doclet.Constants_Summary"))));
|
||||
}
|
||||
if (utils.isClass(holder) && utils.isSerializable((TypeElement)holder)) {
|
||||
@ -258,7 +256,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
appendSeparatorIfNotEmpty(body);
|
||||
DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
|
||||
DocLink link = serialPath.fragment(utils.getFullyQualifiedName(holder));
|
||||
body.addContent(htmlWriter.links.createLink(link,
|
||||
body.add(htmlWriter.links.createLink(link,
|
||||
new StringContent(resources.getText("doclet.Serialized_Form"))));
|
||||
}
|
||||
}
|
||||
@ -266,17 +264,17 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
return body;
|
||||
|
||||
ContentBuilder result = new ContentBuilder();
|
||||
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.seeLabel,
|
||||
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.seeLabel,
|
||||
new StringContent(resources.getText("doclet.See_Also")))));
|
||||
result.addContent(HtmlTree.DD(body));
|
||||
result.add(HtmlTree.DD(body));
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private void appendSeparatorIfNotEmpty(ContentBuilder body) {
|
||||
if (!body.isEmpty()) {
|
||||
body.addContent(", ");
|
||||
body.addContent(DocletConstants.NL);
|
||||
body.add(", ");
|
||||
body.add(DocletConstants.NL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,18 +284,18 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
public Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header) {
|
||||
CommentHelper ch = utils.getCommentHelper(element);
|
||||
ContentBuilder result = new ContentBuilder();
|
||||
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
|
||||
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
|
||||
ContentBuilder body = new ContentBuilder();
|
||||
boolean many = false;
|
||||
for (DocTree simpleTag : simpleTags) {
|
||||
if (many) {
|
||||
body.addContent(", ");
|
||||
body.add(", ");
|
||||
}
|
||||
List<? extends DocTree> bodyTags = ch.getBody(configuration, simpleTag);
|
||||
body.addContent(htmlWriter.commentTagsToContent(simpleTag, element, bodyTags, false, inSummary));
|
||||
body.add(htmlWriter.commentTagsToContent(simpleTag, element, bodyTags, false, inSummary));
|
||||
many = true;
|
||||
}
|
||||
result.addContent(HtmlTree.DD(body));
|
||||
result.add(HtmlTree.DD(body));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -306,11 +304,11 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
*/
|
||||
public Content simpleTagOutput(Element element, DocTree simpleTag, String header) {
|
||||
ContentBuilder result = new ContentBuilder();
|
||||
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
|
||||
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
|
||||
CommentHelper ch = utils.getCommentHelper(element);
|
||||
List<? extends DocTree> description = ch.getDescription(configuration, simpleTag);
|
||||
Content body = htmlWriter.commentTagsToContent(simpleTag, element, description, false, inSummary);
|
||||
result.addContent(HtmlTree.DD(body));
|
||||
result.add(HtmlTree.DD(body));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -351,12 +349,12 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
link.excludeTypeBounds = true;
|
||||
excName = htmlWriter.getLink(link);
|
||||
}
|
||||
body.addContent(HtmlTree.CODE(excName));
|
||||
body.add(HtmlTree.CODE(excName));
|
||||
List<? extends DocTree> description = ch.getDescription(configuration, throwsTag);
|
||||
Content desc = htmlWriter.commentTagsToContent(throwsTag, element, description, false, inSummary);
|
||||
if (desc != null && !desc.isEmpty()) {
|
||||
body.addContent(" - ");
|
||||
body.addContent(desc);
|
||||
body.add(" - ");
|
||||
body.add(desc);
|
||||
}
|
||||
HtmlTree result = HtmlTree.DD(body);
|
||||
return result;
|
||||
|
@ -112,20 +112,20 @@ public class TreeWriter extends AbstractTreeWriter {
|
||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||
addPackageTreeLinks(div);
|
||||
HtmlTree htmlTree = HtmlTree.MAIN();
|
||||
htmlTree.addContent(div);
|
||||
htmlTree.add(div);
|
||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||
divTree.setStyle(HtmlStyle.contentContainer);
|
||||
addTree(classtree.baseClasses(), "doclet.Class_Hierarchy", divTree);
|
||||
addTree(classtree.baseInterfaces(), "doclet.Interface_Hierarchy", divTree);
|
||||
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
|
||||
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree, true);
|
||||
htmlTree.addContent(divTree);
|
||||
body.addContent(htmlTree);
|
||||
htmlTree.add(divTree);
|
||||
body.add(htmlTree);
|
||||
htmlTree = HtmlTree.FOOTER();
|
||||
navBar.setUserFooter(getUserHeaderFooter(false));
|
||||
htmlTree.addContent(navBar.getContent(false));
|
||||
htmlTree.add(navBar.getContent(false));
|
||||
addBottom(htmlTree);
|
||||
body.addContent(htmlTree);
|
||||
body.add(htmlTree);
|
||||
printHtmlDocument(null, "class tree", body);
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ public class TreeWriter extends AbstractTreeWriter {
|
||||
if (!classesOnly) {
|
||||
Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
|
||||
contents.packageHierarchies);
|
||||
contentTree.addContent(span);
|
||||
contentTree.add(span);
|
||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||
ul.setStyle(HtmlStyle.horizontal);
|
||||
int i = 0;
|
||||
@ -159,12 +159,12 @@ public class TreeWriter extends AbstractTreeWriter {
|
||||
Content li = HtmlTree.LI(links.createLink(link,
|
||||
new StringContent(utils.getPackageName(pkg))));
|
||||
if (i < packages.size() - 1) {
|
||||
li.addContent(", ");
|
||||
li.add(", ");
|
||||
}
|
||||
ul.addContent(li);
|
||||
ul.add(li);
|
||||
i++;
|
||||
}
|
||||
contentTree.addContent(ul);
|
||||
contentTree.add(ul);
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,8 +179,8 @@ public class TreeWriter extends AbstractTreeWriter {
|
||||
HtmlTree htmlTree = HtmlTree.HEADER();
|
||||
addTop(htmlTree);
|
||||
navBar.setUserHeader(getUserHeaderFooter(true));
|
||||
htmlTree.addContent(navBar.getContent(true));
|
||||
bodyTree.addContent(htmlTree);
|
||||
htmlTree.add(navBar.getContent(true));
|
||||
bodyTree.add(htmlTree);
|
||||
return bodyTree;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,7 +60,7 @@ public class Comment extends Content {
|
||||
* @param content content that needs to be added
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
public void addContent(Content content) {
|
||||
public void add(Content content) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class Comment extends Content {
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void addContent(CharSequence stringContent) {
|
||||
public void add(CharSequence stringContent) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,12 +43,12 @@ public class ContentBuilder extends Content {
|
||||
|
||||
public ContentBuilder(Content... contents) {
|
||||
for (Content c : contents) {
|
||||
addContent(c);
|
||||
add(c);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContent(Content content) {
|
||||
public void add(Content content) {
|
||||
nullCheck(content);
|
||||
ensureMutableContents();
|
||||
if (content instanceof ContentBuilder) {
|
||||
@ -58,7 +58,7 @@ public class ContentBuilder extends Content {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContent(CharSequence text) {
|
||||
public void add(CharSequence text) {
|
||||
if (text.length() == 0)
|
||||
return;
|
||||
ensureMutableContents();
|
||||
@ -69,7 +69,7 @@ public class ContentBuilder extends Content {
|
||||
} else {
|
||||
contents.add(sc = new StringContent());
|
||||
}
|
||||
sc.addContent(text);
|
||||
sc.add(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -59,7 +59,7 @@ public class FixedStringContent extends Content {
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void addContent(Content content) {
|
||||
public void add(Content content) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class FixedStringContent extends Content {
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void addContent(CharSequence strContent) {
|
||||
public void add(CharSequence strContent) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -251,40 +251,40 @@ public class Head {
|
||||
Date now = showTimestamp ? calendar.getTime() : null;
|
||||
|
||||
HtmlTree tree = new HtmlTree(HtmlTag.HEAD);
|
||||
tree.addContent(getGeneratedBy(showTimestamp, now));
|
||||
tree.addContent(HtmlTree.TITLE(title));
|
||||
tree.add(getGeneratedBy(showTimestamp, now));
|
||||
tree.add(HtmlTree.TITLE(title));
|
||||
|
||||
if (charset != null) { // compatibility; should this be allowed?
|
||||
tree.addContent(HtmlTree.META("Content-Type", "text/html", charset));
|
||||
tree.add(HtmlTree.META("Content-Type", "text/html", charset));
|
||||
}
|
||||
|
||||
if (showTimestamp) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
tree.addContent(HtmlTree.META("dc.created", dateFormat.format(now)));
|
||||
tree.add(HtmlTree.META("dc.created", dateFormat.format(now)));
|
||||
}
|
||||
|
||||
if (description != null) {
|
||||
tree.addContent(HtmlTree.META("description", description));
|
||||
tree.add(HtmlTree.META("description", description));
|
||||
}
|
||||
|
||||
if (generator != null) {
|
||||
tree.addContent(HtmlTree.META("generator", generator));
|
||||
tree.add(HtmlTree.META("generator", generator));
|
||||
}
|
||||
|
||||
for (String k : keywords) {
|
||||
tree.addContent(HtmlTree.META("keywords", k));
|
||||
tree.add(HtmlTree.META("keywords", k));
|
||||
}
|
||||
|
||||
if (canonicalLink != null) {
|
||||
HtmlTree link = new HtmlTree(HtmlTag.LINK);
|
||||
link.addAttr(HtmlAttr.REL, "canonical");
|
||||
link.addAttr(HtmlAttr.HREF, canonicalLink.getPath());
|
||||
tree.addContent(link);
|
||||
link.put(HtmlAttr.REL, "canonical");
|
||||
link.put(HtmlAttr.HREF, canonicalLink.getPath());
|
||||
tree.add(link);
|
||||
}
|
||||
|
||||
addStylesheets(tree);
|
||||
addScripts(tree);
|
||||
extraContent.forEach(tree::addContent);
|
||||
extraContent.forEach(tree::add);
|
||||
|
||||
return tree;
|
||||
}
|
||||
@ -316,13 +316,13 @@ public class Head {
|
||||
}
|
||||
|
||||
private void addStylesheet(HtmlTree tree, DocPath stylesheet) {
|
||||
tree.addContent(HtmlTree.LINK("stylesheet", "text/css",
|
||||
tree.add(HtmlTree.LINK("stylesheet", "text/css",
|
||||
pathToRoot.resolve(stylesheet).getPath(), "Style"));
|
||||
}
|
||||
|
||||
private void addScripts(HtmlTree tree) {
|
||||
if (addDefaultScript) {
|
||||
tree.addContent(HtmlTree.SCRIPT(pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath()));
|
||||
tree.add(HtmlTree.SCRIPT(pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath()));
|
||||
}
|
||||
if (index) {
|
||||
if (pathToRoot != null && mainBodyScript != null) {
|
||||
@ -335,20 +335,20 @@ public class Head {
|
||||
}
|
||||
addJQueryFile(tree, DocPaths.JSZIP_MIN);
|
||||
addJQueryFile(tree, DocPaths.JSZIPUTILS_MIN);
|
||||
tree.addContent(new RawHtml("<!--[if IE]>"));
|
||||
tree.add(new RawHtml("<!--[if IE]>"));
|
||||
addJQueryFile(tree, DocPaths.JSZIPUTILS_IE_MIN);
|
||||
tree.addContent(new RawHtml("<![endif]-->"));
|
||||
tree.add(new RawHtml("<![endif]-->"));
|
||||
addJQueryFile(tree, DocPaths.JQUERY_JS_3_3);
|
||||
addJQueryFile(tree, DocPaths.JQUERY_MIGRATE);
|
||||
addJQueryFile(tree, DocPaths.JQUERY_JS);
|
||||
}
|
||||
for (Script script : scripts) {
|
||||
tree.addContent(script.asContent());
|
||||
tree.add(script.asContent());
|
||||
}
|
||||
}
|
||||
|
||||
private void addJQueryFile(HtmlTree tree, DocPath filePath) {
|
||||
DocPath jqueryFile = pathToRoot.resolve(DocPaths.JQUERY_FILES.resolve(filePath));
|
||||
tree.addContent(HtmlTree.SCRIPT(jqueryFile.getPath()));
|
||||
tree.add(HtmlTree.SCRIPT(jqueryFile.getPath()));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -75,7 +75,7 @@ public class HtmlTree extends Content {
|
||||
public HtmlTree(HtmlTag tag, Content... contents) {
|
||||
this(tag);
|
||||
for (Content c: contents)
|
||||
addContent(c);
|
||||
add(c);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,7 +87,7 @@ public class HtmlTree extends Content {
|
||||
public HtmlTree(HtmlTag tag, List<Content> contents) {
|
||||
this(tag);
|
||||
for (Content c: contents)
|
||||
addContent(c);
|
||||
add(c);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,7 +97,7 @@ public class HtmlTree extends Content {
|
||||
* @param attrValue value of the attribute
|
||||
* @return this object
|
||||
*/
|
||||
public HtmlTree addAttr(HtmlAttr attrName, String attrValue) {
|
||||
public HtmlTree put(HtmlAttr attrName, String attrValue) {
|
||||
if (attrs.isEmpty())
|
||||
attrs = new LinkedHashMap<>(3);
|
||||
attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue));
|
||||
@ -112,7 +112,7 @@ public class HtmlTree extends Content {
|
||||
* @return this object
|
||||
*/
|
||||
public HtmlTree setTitle(Content body) {
|
||||
addAttr(HtmlAttr.TITLE, stripHtml(body));
|
||||
put(HtmlAttr.TITLE, stripHtml(body));
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ public class HtmlTree extends Content {
|
||||
* @return this object
|
||||
*/
|
||||
public HtmlTree setRole(Role role) {
|
||||
addAttr(HtmlAttr.ROLE, role.toString());
|
||||
put(HtmlAttr.ROLE, role.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ public class HtmlTree extends Content {
|
||||
* @return this object
|
||||
*/
|
||||
public HtmlTree setStyle(HtmlStyle style) {
|
||||
addAttr(HtmlAttr.CLASS, style.toString());
|
||||
put(HtmlAttr.CLASS, style.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -144,10 +144,10 @@ public class HtmlTree extends Content {
|
||||
* @param tagContent tag content to be added
|
||||
*/
|
||||
@Override
|
||||
public void addContent(Content tagContent) {
|
||||
public void add(Content tagContent) {
|
||||
if (tagContent instanceof ContentBuilder) {
|
||||
for (Content c: ((ContentBuilder)tagContent).contents) {
|
||||
addContent(c);
|
||||
add(c);
|
||||
}
|
||||
}
|
||||
else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
|
||||
@ -165,16 +165,16 @@ public class HtmlTree extends Content {
|
||||
* @param stringContent string content that needs to be added
|
||||
*/
|
||||
@Override
|
||||
public void addContent(CharSequence stringContent) {
|
||||
public void add(CharSequence stringContent) {
|
||||
if (!content.isEmpty()) {
|
||||
Content lastContent = content.get(content.size() - 1);
|
||||
if (lastContent instanceof StringContent)
|
||||
lastContent.addContent(stringContent);
|
||||
lastContent.add(stringContent);
|
||||
else
|
||||
addContent(new StringContent(stringContent));
|
||||
add(new StringContent(stringContent));
|
||||
}
|
||||
else
|
||||
addContent(new StringContent(stringContent));
|
||||
add(new StringContent(stringContent));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -294,7 +294,7 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree A(String ref, Content body) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body));
|
||||
htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref));
|
||||
htmltree.put(HtmlAttr.HREF, encodeURL(ref));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -307,8 +307,8 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree A_ID(String id, Content body) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.A);
|
||||
htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
|
||||
htmltree.addContent(nullCheck(body));
|
||||
htmltree.put(HtmlAttr.ID, nullCheck(id));
|
||||
htmltree.add(nullCheck(body));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree HTML(String lang, Content head, Content body) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.HTML, nullCheck(head), nullCheck(body));
|
||||
htmltree.addAttr(HtmlAttr.LANG, nullCheck(lang));
|
||||
htmltree.put(HtmlAttr.LANG, nullCheck(lang));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -511,9 +511,9 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree IFRAME(String src, String name, String title) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.IFRAME);
|
||||
htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
|
||||
htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
|
||||
htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
|
||||
htmltree.put(HtmlAttr.SRC, nullCheck(src));
|
||||
htmltree.put(HtmlAttr.NAME, nullCheck(name));
|
||||
htmltree.put(HtmlAttr.TITLE, nullCheck(title));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -527,10 +527,10 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree INPUT(String type, String id, String value) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.INPUT);
|
||||
htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type));
|
||||
htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
|
||||
htmltree.addAttr(HtmlAttr.VALUE, nullCheck(value));
|
||||
htmltree.addAttr(HtmlAttr.DISABLED, "disabled");
|
||||
htmltree.put(HtmlAttr.TYPE, nullCheck(type));
|
||||
htmltree.put(HtmlAttr.ID, nullCheck(id));
|
||||
htmltree.put(HtmlAttr.VALUE, nullCheck(value));
|
||||
htmltree.put(HtmlAttr.DISABLED, "disabled");
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -543,7 +543,7 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree LABEL(String forLabel, Content body) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.LABEL, nullCheck(body));
|
||||
htmltree.addAttr(HtmlAttr.FOR, nullCheck(forLabel));
|
||||
htmltree.put(HtmlAttr.FOR, nullCheck(forLabel));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -582,10 +582,10 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree LINK(String rel, String type, String href, String title) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.LINK);
|
||||
htmltree.addAttr(HtmlAttr.REL, nullCheck(rel));
|
||||
htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type));
|
||||
htmltree.addAttr(HtmlAttr.HREF, nullCheck(href));
|
||||
htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
|
||||
htmltree.put(HtmlAttr.REL, nullCheck(rel));
|
||||
htmltree.put(HtmlAttr.TYPE, nullCheck(type));
|
||||
htmltree.put(HtmlAttr.HREF, nullCheck(href));
|
||||
htmltree.put(HtmlAttr.TITLE, nullCheck(title));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -638,8 +638,8 @@ public class HtmlTree extends Content {
|
||||
public static HtmlTree META(String httpEquiv, String content, String charSet) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.META);
|
||||
String contentCharset = content + "; charset=" + charSet;
|
||||
htmltree.addAttr(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv));
|
||||
htmltree.addAttr(HtmlAttr.CONTENT, contentCharset);
|
||||
htmltree.put(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv));
|
||||
htmltree.put(HtmlAttr.CONTENT, contentCharset);
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -652,8 +652,8 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree META(String name, String content) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.META);
|
||||
htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
|
||||
htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content));
|
||||
htmltree.put(HtmlAttr.NAME, nullCheck(name));
|
||||
htmltree.put(HtmlAttr.CONTENT, nullCheck(content));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -711,8 +711,8 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree SCRIPT(String src) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT);
|
||||
htmltree.addAttr(HtmlAttr.TYPE, "text/javascript");
|
||||
htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
|
||||
htmltree.put(HtmlAttr.TYPE, "text/javascript");
|
||||
htmltree.put(HtmlAttr.SRC, nullCheck(src));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -785,7 +785,7 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body));
|
||||
htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
|
||||
htmltree.put(HtmlAttr.ID, nullCheck(id));
|
||||
if (styleClass != null)
|
||||
htmltree.setStyle(styleClass);
|
||||
return htmltree;
|
||||
@ -803,7 +803,7 @@ public class HtmlTree extends Content {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
|
||||
if (styleClass != null)
|
||||
htmltree.setStyle(styleClass);
|
||||
htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
|
||||
htmltree.put(HtmlAttr.SUMMARY, nullCheck(summary));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -858,7 +858,7 @@ public class HtmlTree extends Content {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.TH, nullCheck(body));
|
||||
if (styleClass != null)
|
||||
htmltree.setStyle(styleClass);
|
||||
htmltree.addAttr(HtmlAttr.SCOPE, nullCheck(scope));
|
||||
htmltree.put(HtmlAttr.SCOPE, nullCheck(scope));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -916,9 +916,9 @@ public class HtmlTree extends Content {
|
||||
*/
|
||||
public static HtmlTree UL(HtmlStyle styleClass, Content first, Content... more) {
|
||||
HtmlTree htmlTree = new HtmlTree(HtmlTag.UL);
|
||||
htmlTree.addContent(nullCheck(first));
|
||||
htmlTree.add(nullCheck(first));
|
||||
for (Content c : more) {
|
||||
htmlTree.addContent(nullCheck(c));
|
||||
htmlTree.add(nullCheck(c));
|
||||
}
|
||||
htmlTree.setStyle(nullCheck(styleClass));
|
||||
return htmlTree;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -233,10 +233,10 @@ public class Links {
|
||||
public Content createLink(DocLink link, Content label, String title, String target) {
|
||||
HtmlTree anchor = HtmlTree.A(link.relativizeAgainst(file).toString(), label);
|
||||
if (title != null && title.length() != 0) {
|
||||
anchor.addAttr(HtmlAttr.TITLE, title);
|
||||
anchor.put(HtmlAttr.TITLE, title);
|
||||
}
|
||||
if (target != null && target.length() != 0) {
|
||||
anchor.addAttr(HtmlAttr.TARGET, target);
|
||||
anchor.put(HtmlAttr.TARGET, target);
|
||||
}
|
||||
return anchor;
|
||||
}
|
||||
@ -279,10 +279,10 @@ public class Links {
|
||||
}
|
||||
HtmlTree l = HtmlTree.A(link.relativizeAgainst(file).toString(), body);
|
||||
if (title != null && title.length() != 0) {
|
||||
l.addAttr(HtmlAttr.TITLE, title);
|
||||
l.put(HtmlAttr.TITLE, title);
|
||||
}
|
||||
if (target != null && target.length() != 0) {
|
||||
l.addAttr(HtmlAttr.TARGET, target);
|
||||
l.put(HtmlAttr.TARGET, target);
|
||||
}
|
||||
if (isExternal) {
|
||||
l.setStyle(HtmlStyle.externalLink);
|
||||
|
@ -429,8 +429,8 @@ public class Navigation {
|
||||
}
|
||||
if (!listContents.isEmpty()) {
|
||||
Content li = HtmlTree.LI(contents.summaryLabel);
|
||||
li.addContent(Contents.SPACE);
|
||||
tree.addContent(li);
|
||||
li.add(Contents.SPACE);
|
||||
tree.add(li);
|
||||
addListToNav(listContents, tree);
|
||||
}
|
||||
break;
|
||||
@ -461,8 +461,8 @@ public class Navigation {
|
||||
}
|
||||
if (!listContents.isEmpty()) {
|
||||
Content li = HtmlTree.LI(contents.moduleSubNavLabel);
|
||||
li.addContent(Contents.SPACE);
|
||||
tree.addContent(li);
|
||||
li.add(Contents.SPACE);
|
||||
tree.add(li);
|
||||
addListToNav(listContents, tree);
|
||||
}
|
||||
break;
|
||||
@ -665,8 +665,8 @@ public class Navigation {
|
||||
}
|
||||
if (!listContents.isEmpty()) {
|
||||
Content li = HtmlTree.LI(contents.detailLabel);
|
||||
li.addContent(Contents.SPACE);
|
||||
tree.addContent(li);
|
||||
li.add(Contents.SPACE);
|
||||
tree.add(li);
|
||||
addListToNav(listContents, tree);
|
||||
}
|
||||
break;
|
||||
@ -794,37 +794,37 @@ public class Navigation {
|
||||
}
|
||||
|
||||
private void addContentToTree(Content tree, Content content) {
|
||||
tree.addContent(HtmlTree.LI(content));
|
||||
tree.add(HtmlTree.LI(content));
|
||||
}
|
||||
|
||||
private void addListToNav(List<Content> listContents, Content tree) {
|
||||
int count = 0;
|
||||
for (Content liContent : listContents) {
|
||||
if (count < listContents.size() - 1) {
|
||||
liContent.addContent(Contents.SPACE);
|
||||
liContent.addContent("|");
|
||||
liContent.addContent(Contents.SPACE);
|
||||
liContent.add(Contents.SPACE);
|
||||
liContent.add("|");
|
||||
liContent.add(Contents.SPACE);
|
||||
}
|
||||
tree.addContent(liContent);
|
||||
tree.add(liContent);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
private void addActivePageLink(Content tree, Content label, boolean display) {
|
||||
if (display) {
|
||||
tree.addContent(HtmlTree.LI(HtmlStyle.navBarCell1Rev, label));
|
||||
tree.add(HtmlTree.LI(HtmlStyle.navBarCell1Rev, label));
|
||||
}
|
||||
}
|
||||
|
||||
private void addPageLabel(Content tree, Content label, boolean display) {
|
||||
if (display) {
|
||||
tree.addContent(HtmlTree.LI(label));
|
||||
tree.add(HtmlTree.LI(label));
|
||||
}
|
||||
}
|
||||
|
||||
private void addOverviewLink(Content tree) {
|
||||
if (configuration.createoverview) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.overviewSummary(configuration.frames)),
|
||||
tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.overviewSummary(configuration.frames)),
|
||||
contents.overviewLabel, "", "")));
|
||||
}
|
||||
}
|
||||
@ -834,7 +834,7 @@ public class Navigation {
|
||||
if (configuration.modules.size() == 1) {
|
||||
ModuleElement mdle = configuration.modules.first();
|
||||
boolean included = configuration.utils.isIncluded(mdle);
|
||||
tree.addContent(HtmlTree.LI((included)
|
||||
tree.add(HtmlTree.LI((included)
|
||||
? links.createLink(pathToRoot.resolve(configuration.docPaths.moduleSummary(mdle)), contents.moduleLabel, "", "")
|
||||
: contents.moduleLabel));
|
||||
} else if (!configuration.modules.isEmpty()) {
|
||||
@ -845,7 +845,7 @@ public class Navigation {
|
||||
|
||||
private void addModuleOfElementLink(Content tree) {
|
||||
if (configuration.showModules) {
|
||||
tree.addContent(HtmlTree.LI(navLinkModule));
|
||||
tree.add(HtmlTree.LI(navLinkModule));
|
||||
}
|
||||
}
|
||||
|
||||
@ -862,16 +862,16 @@ public class Navigation {
|
||||
}
|
||||
}
|
||||
if (included || packageElement == null) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(
|
||||
tree.add(HtmlTree.LI(links.createLink(
|
||||
pathToRoot.resolve(configuration.docPaths.forPackage(packageElement).resolve(DocPaths.PACKAGE_SUMMARY)),
|
||||
contents.packageLabel)));
|
||||
} else {
|
||||
DocLink crossPkgLink = configuration.extern.getExternalLink(
|
||||
packageElement, pathToRoot, DocPaths.PACKAGE_SUMMARY.getPath());
|
||||
if (crossPkgLink != null) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(crossPkgLink, contents.packageLabel)));
|
||||
tree.add(HtmlTree.LI(links.createLink(crossPkgLink, contents.packageLabel)));
|
||||
} else {
|
||||
tree.addContent(HtmlTree.LI(contents.packageLabel));
|
||||
tree.add(HtmlTree.LI(contents.packageLabel));
|
||||
}
|
||||
}
|
||||
} else if (!configuration.packages.isEmpty()) {
|
||||
@ -880,12 +880,12 @@ public class Navigation {
|
||||
}
|
||||
|
||||
private void addPackageOfElementLink(Content tree) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY),
|
||||
tree.add(HtmlTree.LI(links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY),
|
||||
contents.packageLabel)));
|
||||
}
|
||||
|
||||
private void addPackageSummaryLink(Content tree) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(DocPaths.PACKAGE_SUMMARY, contents.packageLabel)));
|
||||
tree.add(HtmlTree.LI(links.createLink(DocPaths.PACKAGE_SUMMARY, contents.packageLabel)));
|
||||
}
|
||||
|
||||
private void addTreeLink(Content tree) {
|
||||
@ -894,20 +894,20 @@ public class Navigation {
|
||||
DocPath docPath = packages.size() == 1 && configuration.getSpecifiedTypeElements().isEmpty()
|
||||
? pathToRoot.resolve(configuration.docPaths.forPackage(packages.get(0)).resolve(DocPaths.PACKAGE_TREE))
|
||||
: pathToRoot.resolve(DocPaths.OVERVIEW_TREE);
|
||||
tree.addContent(HtmlTree.LI(links.createLink(docPath, contents.treeLabel, "", "")));
|
||||
tree.add(HtmlTree.LI(links.createLink(docPath, contents.treeLabel, "", "")));
|
||||
}
|
||||
}
|
||||
|
||||
private void addDeprecatedLink(Content tree) {
|
||||
if (!(configuration.nodeprecated || configuration.nodeprecatedlist)) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST),
|
||||
tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST),
|
||||
contents.deprecatedLabel, "", "")));
|
||||
}
|
||||
}
|
||||
|
||||
private void addIndexLink(Content tree) {
|
||||
if (configuration.createindex) {
|
||||
tree.addContent(HtmlTree.LI(links.createLink(pathToRoot.resolve(
|
||||
tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(
|
||||
(configuration.splitindex
|
||||
? DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1))
|
||||
: DocPaths.INDEX_ALL)),
|
||||
@ -925,7 +925,7 @@ public class Navigation {
|
||||
DocFile file = DocFile.createFileForInput(configuration, helpfile);
|
||||
helpfilenm = DocPath.create(file.getName());
|
||||
}
|
||||
tree.addContent(HtmlTree.LI(links.createLink(pathToRoot.resolve(helpfilenm),
|
||||
tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(helpfilenm),
|
||||
contents.helpLabel, "", "")));
|
||||
}
|
||||
}
|
||||
@ -938,7 +938,7 @@ public class Navigation {
|
||||
private void addNavShowLists(Content tree) {
|
||||
DocLink dl = new DocLink(pathToRoot.resolve(DocPaths.INDEX), path.getPath(), null);
|
||||
Content framesContent = links.createLink(dl, contents.framesLabel, "", "_top");
|
||||
tree.addContent(HtmlTree.LI(framesContent));
|
||||
tree.add(HtmlTree.LI(framesContent));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -948,7 +948,7 @@ public class Navigation {
|
||||
*/
|
||||
private void addNavHideLists(Content tree) {
|
||||
Content noFramesContent = links.createLink(path.basename(), contents.noFramesLabel, "", "_top");
|
||||
tree.addContent(HtmlTree.LI(noFramesContent));
|
||||
tree.add(HtmlTree.LI(noFramesContent));
|
||||
}
|
||||
|
||||
private void addSearch(Content tree) {
|
||||
@ -957,14 +957,14 @@ public class Navigation {
|
||||
HtmlTree inputText = HtmlTree.INPUT("text", searchValueId, searchValueId);
|
||||
HtmlTree inputReset = HtmlTree.INPUT(reset, reset, reset);
|
||||
HtmlTree liInput = HtmlTree.LI(HtmlTree.LABEL(searchValueId, searchLabel));
|
||||
liInput.addContent(inputText);
|
||||
liInput.addContent(inputReset);
|
||||
liInput.add(inputText);
|
||||
liInput.add(inputReset);
|
||||
HtmlTree ulSearch = HtmlTree.UL(HtmlStyle.navListSearch, liInput);
|
||||
tree.addContent(ulSearch);
|
||||
tree.add(ulSearch);
|
||||
}
|
||||
|
||||
private void addFixedNavScript(Content tree) {
|
||||
tree.addContent(FIXED_NAV_SCRIPT.asContent());
|
||||
tree.add(FIXED_NAV_SCRIPT.asContent());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -981,29 +981,29 @@ public class Navigation {
|
||||
HtmlTree navDiv = new HtmlTree(HtmlTag.DIV);
|
||||
if (top) {
|
||||
queue = topBottomNavContents.get(Position.TOP);
|
||||
fixedNavDiv.addContent(Position.TOP.startOfNav());
|
||||
fixedNavDiv.add(Position.TOP.startOfNav());
|
||||
navDiv.setStyle(HtmlStyle.topNav);
|
||||
} else {
|
||||
queue = topBottomNavContents.get(Position.BOTTOM);
|
||||
tree.addContent(Position.BOTTOM.startOfNav());
|
||||
tree.add(Position.BOTTOM.startOfNav());
|
||||
navDiv.setStyle(HtmlStyle.bottomNav);
|
||||
}
|
||||
navDiv.addContent(queue.poll());
|
||||
navDiv.add(queue.poll());
|
||||
HtmlTree skipLinkDiv = HtmlTree.DIV(HtmlStyle.skipNav, queue.poll());
|
||||
navDiv.addContent(skipLinkDiv);
|
||||
navDiv.addContent(queue.poll());
|
||||
navDiv.add(skipLinkDiv);
|
||||
navDiv.add(queue.poll());
|
||||
HtmlTree navList = new HtmlTree(HtmlTag.UL);
|
||||
navList.setStyle(HtmlStyle.navList);
|
||||
navList.addAttr(HtmlAttr.TITLE, rowListTitle);
|
||||
navList.put(HtmlAttr.TITLE, rowListTitle);
|
||||
fixedNavDiv.setStyle(HtmlStyle.fixedNav);
|
||||
addMainNavLinks(navList);
|
||||
navDiv.addContent(navList);
|
||||
navDiv.add(navList);
|
||||
Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, top ? userHeader : userFooter);
|
||||
navDiv.addContent(aboutDiv);
|
||||
navDiv.add(aboutDiv);
|
||||
if (top) {
|
||||
fixedNavDiv.addContent(navDiv);
|
||||
fixedNavDiv.add(navDiv);
|
||||
} else {
|
||||
tree.addContent(navDiv);
|
||||
tree.add(navDiv);
|
||||
}
|
||||
HtmlTree subDiv = new HtmlTree(HtmlTag.DIV);
|
||||
subDiv.setStyle(HtmlStyle.subNav);
|
||||
@ -1012,12 +1012,12 @@ public class Navigation {
|
||||
HtmlTree ulNavSummary = new HtmlTree(HtmlTag.UL);
|
||||
ulNavSummary.setStyle(HtmlStyle.subNavList);
|
||||
addSummaryLinks(ulNavSummary);
|
||||
div.addContent(ulNavSummary);
|
||||
div.add(ulNavSummary);
|
||||
// Add the detail links if present.
|
||||
HtmlTree ulNavDetail = new HtmlTree(HtmlTag.UL);
|
||||
ulNavDetail.setStyle(HtmlStyle.subNavList);
|
||||
addDetailLinks(ulNavDetail);
|
||||
div.addContent(ulNavDetail);
|
||||
div.add(ulNavDetail);
|
||||
HtmlTree ulFrames = new HtmlTree(HtmlTag.UL);
|
||||
ulFrames.setStyle(HtmlStyle.navList);
|
||||
if (!configuration.nonavbar) {
|
||||
@ -1026,23 +1026,23 @@ public class Navigation {
|
||||
addNavHideLists(ulFrames);
|
||||
}
|
||||
}
|
||||
div.addContent(ulFrames);
|
||||
subDiv.addContent(div);
|
||||
div.add(ulFrames);
|
||||
subDiv.add(div);
|
||||
if (top && configuration.createindex) {
|
||||
addSearch(subDiv);
|
||||
}
|
||||
if (top) {
|
||||
fixedNavDiv.addContent(subDiv);
|
||||
fixedNavDiv.addContent(queue.poll());
|
||||
fixedNavDiv.addContent(Position.TOP.endOfNav());
|
||||
tree.addContent(fixedNavDiv);
|
||||
fixedNavDiv.add(subDiv);
|
||||
fixedNavDiv.add(queue.poll());
|
||||
fixedNavDiv.add(Position.TOP.endOfNav());
|
||||
tree.add(fixedNavDiv);
|
||||
HtmlTree paddingDiv = HtmlTree.DIV(HtmlStyle.navPadding, Contents.SPACE);
|
||||
tree.addContent(paddingDiv);
|
||||
tree.add(paddingDiv);
|
||||
addFixedNavScript(tree);
|
||||
} else {
|
||||
tree.addContent(subDiv);
|
||||
tree.addContent(queue.poll());
|
||||
tree.addContent(Position.BOTTOM.endOfNav());
|
||||
tree.add(subDiv);
|
||||
tree.add(queue.poll());
|
||||
tree.add(Position.BOTTOM.endOfNav());
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -64,7 +64,7 @@ public class RawHtml extends Content {
|
||||
* @param content content that needs to be added
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
public void addContent(Content content) {
|
||||
public void add(Content content) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ public class RawHtml extends Content {
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void addContent(CharSequence stringContent) {
|
||||
public void add(CharSequence stringContent) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -108,19 +108,19 @@ public class Script {
|
||||
ScriptContent scriptContent = new ScriptContent(sb);
|
||||
HtmlTree tree = new HtmlTree(HtmlTag.SCRIPT) {
|
||||
@Override
|
||||
public void addContent(CharSequence s) {
|
||||
public void add(CharSequence s) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
@Override
|
||||
public void addContent(Content c) {
|
||||
public void add(Content c) {
|
||||
if (c != scriptContent) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
super.addContent(scriptContent);
|
||||
super.add(scriptContent);
|
||||
}
|
||||
};
|
||||
tree.addAttr(HtmlAttr.TYPE, "text/javascript");
|
||||
tree.addContent(scriptContent);
|
||||
tree.put(HtmlAttr.TYPE, "text/javascript");
|
||||
tree.add(scriptContent);
|
||||
return tree;
|
||||
}
|
||||
|
||||
@ -200,12 +200,12 @@ public class Script {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContent(Content content) {
|
||||
public void add(Content content) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContent(CharSequence code) {
|
||||
public void add(CharSequence code) {
|
||||
sb.append(code);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -69,7 +69,7 @@ public class StringContent extends Content {
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void addContent(Content content) {
|
||||
public void add(Content content) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ public class StringContent extends Content {
|
||||
* @param strContent string content to be added
|
||||
*/
|
||||
@Override
|
||||
public void addContent(CharSequence strContent) {
|
||||
public void add(CharSequence strContent) {
|
||||
appendChars(strContent);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,6 @@ import javax.lang.model.element.Element;
|
||||
|
||||
import jdk.javadoc.internal.doclets.formats.html.Contents;
|
||||
import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
|
||||
|
||||
/**
|
||||
* A builder for HTML tables, such as the summary tables for various
|
||||
@ -347,7 +346,7 @@ public class Table {
|
||||
|
||||
if (stripedStyles != null) {
|
||||
int rowIndex = bodyRows.size();
|
||||
row.addAttr(HtmlAttr.CLASS, stripedStyles.get(rowIndex % 2).name());
|
||||
row.put(HtmlAttr.CLASS, stripedStyles.get(rowIndex % 2).name());
|
||||
}
|
||||
int colIndex = 0;
|
||||
for (Content c : contents) {
|
||||
@ -357,14 +356,14 @@ public class Table {
|
||||
HtmlTree cell = (colIndex == rowScopeColumnIndex)
|
||||
? HtmlTree.TH(cellStyle, "row", c)
|
||||
: HtmlTree.TD(cellStyle, c);
|
||||
row.addContent(cell);
|
||||
row.add(cell);
|
||||
colIndex++;
|
||||
}
|
||||
bodyRows.add(row);
|
||||
|
||||
if (tabMap != null) {
|
||||
int index = bodyRows.size() - 1;
|
||||
row.addAttr(HtmlAttr.ID, (rowIdPrefix + index));
|
||||
row.put(HtmlAttr.ID, (rowIdPrefix + index));
|
||||
int mask = 0;
|
||||
int maskBit = 1;
|
||||
for (Map.Entry<String, Predicate<Element>> e : tabMap.entrySet()) {
|
||||
@ -401,60 +400,60 @@ public class Table {
|
||||
HtmlTree table = new HtmlTree(HtmlTag.TABLE);
|
||||
if (tabMap == null || tabs.size() == 1) {
|
||||
if (tabMap == null) {
|
||||
table.addContent(caption);
|
||||
table.add(caption);
|
||||
} else if (tabs.size() == 1) {
|
||||
String tabName = tabs.iterator().next();
|
||||
table.addContent(getCaption(new StringContent(tabName)));
|
||||
table.add(getCaption(new StringContent(tabName)));
|
||||
}
|
||||
table.addContent(getTableBody());
|
||||
mainDiv.addContent(table);
|
||||
table.add(getTableBody());
|
||||
mainDiv.add(table);
|
||||
} else {
|
||||
HtmlTree tablist = new HtmlTree(HtmlTag.DIV)
|
||||
.addAttr(HtmlAttr.ROLE, "tablist")
|
||||
.addAttr(HtmlAttr.ARIA_ORIENTATION, "horizontal");
|
||||
.put(HtmlAttr.ROLE, "tablist")
|
||||
.put(HtmlAttr.ARIA_ORIENTATION, "horizontal");
|
||||
|
||||
int tabIndex = 0;
|
||||
tablist.addContent(createTab(tabId.apply(tabIndex), activeTabStyle, true, defaultTab));
|
||||
table.addAttr(HtmlAttr.ARIA_LABELLEDBY, tabId.apply(tabIndex));
|
||||
tablist.add(createTab(tabId.apply(tabIndex), activeTabStyle, true, defaultTab));
|
||||
table.put(HtmlAttr.ARIA_LABELLEDBY, tabId.apply(tabIndex));
|
||||
for (String tabName : tabMap.keySet()) {
|
||||
tabIndex++;
|
||||
if (tabs.contains(tabName)) {
|
||||
String script = tabScript.apply(1 << (tabIndex - 1));
|
||||
HtmlTree tab = createTab(tabId.apply(tabIndex), tabStyle, false, tabName);
|
||||
tab.addAttr(HtmlAttr.ONCLICK, script);
|
||||
tablist.addContent(tab);
|
||||
tab.put(HtmlAttr.ONCLICK, script);
|
||||
tablist.add(tab);
|
||||
}
|
||||
}
|
||||
HtmlTree tabpanel = new HtmlTree(HtmlTag.DIV)
|
||||
.addAttr(HtmlAttr.ID, tableStyle + "_tabpanel")
|
||||
.addAttr(HtmlAttr.ROLE, "tabpanel");
|
||||
table.addContent(getTableBody());
|
||||
tabpanel.addContent(table);
|
||||
mainDiv.addContent(tablist);
|
||||
mainDiv.addContent(tabpanel);
|
||||
.put(HtmlAttr.ID, tableStyle + "_tabpanel")
|
||||
.put(HtmlAttr.ROLE, "tabpanel");
|
||||
table.add(getTableBody());
|
||||
tabpanel.add(table);
|
||||
mainDiv.add(tablist);
|
||||
mainDiv.add(tabpanel);
|
||||
}
|
||||
return mainDiv;
|
||||
}
|
||||
|
||||
private HtmlTree createTab(String tabId, HtmlStyle style, boolean defaultTab, String tabName) {
|
||||
HtmlTree tab = new HtmlTree(HtmlTag.BUTTON)
|
||||
.addAttr(HtmlAttr.ROLE, "tab")
|
||||
.addAttr(HtmlAttr.ARIA_SELECTED, defaultTab ? "true" : "false")
|
||||
.addAttr(HtmlAttr.ARIA_CONTROLS, tableStyle + "_tabpanel")
|
||||
.addAttr(HtmlAttr.TABINDEX, defaultTab ? "0" : "-1")
|
||||
.addAttr(HtmlAttr.ONKEYDOWN, "switchTab(event)")
|
||||
.addAttr(HtmlAttr.ID, tabId)
|
||||
.put(HtmlAttr.ROLE, "tab")
|
||||
.put(HtmlAttr.ARIA_SELECTED, defaultTab ? "true" : "false")
|
||||
.put(HtmlAttr.ARIA_CONTROLS, tableStyle + "_tabpanel")
|
||||
.put(HtmlAttr.TABINDEX, defaultTab ? "0" : "-1")
|
||||
.put(HtmlAttr.ONKEYDOWN, "switchTab(event)")
|
||||
.put(HtmlAttr.ID, tabId)
|
||||
.setStyle(style);
|
||||
tab.addContent(tabName);
|
||||
tab.add(tabName);
|
||||
return tab;
|
||||
}
|
||||
|
||||
private Content getTableBody() {
|
||||
ContentBuilder tableContent = new ContentBuilder();
|
||||
tableContent.addContent(header.toContent());
|
||||
tableContent.add(header.toContent());
|
||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||
bodyRows.forEach(row -> tbody.addContent(row));
|
||||
tableContent.addContent(tbody);
|
||||
bodyRows.forEach(row -> tbody.add(row));
|
||||
tableContent.add(tbody);
|
||||
return tableContent;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -127,7 +127,7 @@ public class TableHeader {
|
||||
: (i == 1) ? HtmlStyle.colSecond : null;
|
||||
Content cell = (style == null) ? HtmlTree.TH(scope, cellContent)
|
||||
: HtmlTree.TH(style, scope, cellContent);
|
||||
tr.addContent(cell);
|
||||
tr.add(cell);
|
||||
i++;
|
||||
}
|
||||
return tr;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -64,14 +64,14 @@ public abstract class Content {
|
||||
*
|
||||
* @param content content that needs to be added
|
||||
*/
|
||||
public abstract void addContent(Content content);
|
||||
public abstract void add(Content content);
|
||||
|
||||
/**
|
||||
* Adds a string content to the existing content.
|
||||
*
|
||||
* @param stringContent the string content to be added
|
||||
*/
|
||||
public abstract void addContent(CharSequence stringContent);
|
||||
public abstract void add(CharSequence stringContent);
|
||||
|
||||
/**
|
||||
* Writes content to a writer.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -156,7 +156,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
buildAnnotationTypeDescription(annotationInfoTree);
|
||||
buildAnnotationTypeTagInfo(annotationInfoTree);
|
||||
|
||||
annotationContentTree.addContent(writer.getAnnotationInfo(annotationInfoTree));
|
||||
annotationContentTree.add(writer.getAnnotationInfo(annotationInfoTree));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -205,7 +205,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
protected void buildMemberSummary(Content annotationContentTree) throws DocletException {
|
||||
Content memberSummaryTree = writer.getMemberTreeHeader();
|
||||
builderFactory.getMemberSummaryBuilder(writer).build(memberSummaryTree);
|
||||
annotationContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
|
||||
annotationContentTree.add(writer.getMemberSummaryTree(memberSummaryTree));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -223,7 +223,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
buildAnnotationTypeOptionalMemberDetails(memberDetailsTree);
|
||||
|
||||
if (memberDetailsTree.isValid()) {
|
||||
annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
|
||||
annotationContentTree.add(writer.getMemberDetailsTree(memberDetailsTree));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -153,9 +153,9 @@ public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
|
||||
buildMemberComments(annotationDocTree);
|
||||
buildTagInfo(annotationDocTree);
|
||||
|
||||
detailsTree.addContent(writer.getAnnotationDoc(
|
||||
detailsTree.add(writer.getAnnotationDoc(
|
||||
annotationDocTree, currentMember == lastElement));
|
||||
memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
|
||||
memberDetailsTree.add(writer.getAnnotationDetails(detailsTree));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -166,7 +166,7 @@ public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
|
||||
* @param annotationDocTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content annotationDocTree) {
|
||||
annotationDocTree.addContent(
|
||||
annotationDocTree.add(
|
||||
writer.getSignature(currentMember));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -152,9 +152,9 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
|
||||
buildAnnotationTypeMemberChildren(annotationDocTree);
|
||||
|
||||
detailsTree.addContent(writer.getAnnotationDoc(
|
||||
detailsTree.add(writer.getAnnotationDoc(
|
||||
annotationDocTree, currentMember == lastMember));
|
||||
memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
|
||||
memberDetailsTree.add(writer.getAnnotationDetails(detailsTree));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
* @param annotationDocTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content annotationDocTree) {
|
||||
annotationDocTree.addContent(writer.getSignature(currentMember));
|
||||
annotationDocTree.add(writer.getSignature(currentMember));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -181,7 +181,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
buildClassDescription(classInfoTree);
|
||||
buildClassTagInfo(classInfoTree);
|
||||
|
||||
classContentTree.addContent(writer.getClassInfo(classInfoTree));
|
||||
classContentTree.add(writer.getClassInfo(classInfoTree));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -322,7 +322,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
protected void buildMemberSummary(Content classContentTree) throws DocletException {
|
||||
Content memberSummaryTree = writer.getMemberTreeHeader();
|
||||
builderFactory.getMemberSummaryBuilder(writer).build(memberSummaryTree);
|
||||
classContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
|
||||
classContentTree.add(writer.getMemberSummaryTree(memberSummaryTree));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -340,7 +340,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
buildConstructorDetails(memberDetailsTree);
|
||||
buildMethodDetails(memberDetailsTree);
|
||||
|
||||
classContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
|
||||
classContentTree.add(writer.getMemberDetailsTree(memberDetailsTree));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -148,10 +148,10 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
buildConstructorComments(constructorDocTree);
|
||||
buildTagInfo(constructorDocTree);
|
||||
|
||||
constructorDetailsTree.addContent(writer.getConstructorDoc(constructorDocTree,
|
||||
constructorDetailsTree.add(writer.getConstructorDoc(constructorDocTree,
|
||||
currentConstructor == lastElement));
|
||||
}
|
||||
memberDetailsTree.addContent(
|
||||
memberDetailsTree.add(
|
||||
writer.getConstructorDetails(constructorDetailsTree));
|
||||
}
|
||||
}
|
||||
@ -162,7 +162,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
* @param constructorDocTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content constructorDocTree) {
|
||||
constructorDocTree.addContent(writer.getSignature(currentConstructor));
|
||||
constructorDocTree.add(writer.getSignature(currentConstructor));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -136,10 +136,10 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
buildEnumConstantComments(enumConstantsTree);
|
||||
buildTagInfo(enumConstantsTree);
|
||||
|
||||
enumConstantsDetailsTree.addContent(writer.getEnumConstants(
|
||||
enumConstantsDetailsTree.add(writer.getEnumConstants(
|
||||
enumConstantsTree, currentElement == lastElement));
|
||||
}
|
||||
memberDetailsTree.addContent(
|
||||
memberDetailsTree.add(
|
||||
writer.getEnumConstantsDetails(enumConstantsDetailsTree));
|
||||
}
|
||||
}
|
||||
@ -150,7 +150,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
* @param enumConstantsTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content enumConstantsTree) {
|
||||
enumConstantsTree.addContent(writer.getSignature(currentElement));
|
||||
enumConstantsTree.add(writer.getSignature(currentElement));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -137,10 +137,10 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
buildFieldComments(fieldDocTree);
|
||||
buildTagInfo(fieldDocTree);
|
||||
|
||||
fieldDetailsTree.addContent(writer.getFieldDoc(
|
||||
fieldDetailsTree.add(writer.getFieldDoc(
|
||||
fieldDocTree, currentElement == lastElement));
|
||||
}
|
||||
memberDetailsTree.addContent(
|
||||
memberDetailsTree.add(
|
||||
writer.getFieldDetails(fieldDetailsTree));
|
||||
}
|
||||
}
|
||||
@ -151,7 +151,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
* @param fieldDocTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content fieldDocTree) {
|
||||
fieldDocTree.addContent(writer.getSignature(currentElement));
|
||||
fieldDocTree.add(writer.getSignature(currentElement));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -464,7 +464,7 @@ public abstract class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
Content inheritedTree = writer.getInheritedSummaryHeader(inheritedClass);
|
||||
Content linksTree = writer.getInheritedSummaryLinksTree();
|
||||
addSummaryFootNote(inheritedClass, inheritedMembers, linksTree, writer);
|
||||
inheritedTree.addContent(linksTree);
|
||||
inheritedTree.add(linksTree);
|
||||
summaryTreeList.add(writer.getMemberTree(inheritedTree));
|
||||
}
|
||||
}
|
||||
@ -497,7 +497,7 @@ public abstract class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
buildInheritedSummary(writer, kind, summaryTreeList);
|
||||
if (!summaryTreeList.isEmpty()) {
|
||||
Content memberTree = writer.getMemberSummaryHeader(typeElement, memberSummaryTree);
|
||||
summaryTreeList.stream().forEach(memberTree::addContent);
|
||||
summaryTreeList.stream().forEach(memberTree::add);
|
||||
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -139,10 +139,10 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
buildMethodComments(methodDocTree);
|
||||
buildTagInfo(methodDocTree);
|
||||
|
||||
methodDetailsTree.addContent(writer.getMethodDoc(
|
||||
methodDetailsTree.add(writer.getMethodDoc(
|
||||
methodDocTree, currentMethod == lastElement));
|
||||
}
|
||||
memberDetailsTree.addContent(writer.getMethodDetails(methodDetailsTree));
|
||||
memberDetailsTree.add(writer.getMethodDetails(methodDetailsTree));
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
* @param methodDocTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content methodDocTree) {
|
||||
methodDocTree.addContent(writer.getSignature(currentMethod));
|
||||
methodDocTree.add(writer.getSignature(currentMethod));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -152,7 +152,7 @@ public class ModuleSummaryBuilder extends AbstractBuilder {
|
||||
buildModulesSummary(summaryContentTree);
|
||||
buildServicesSummary(summaryContentTree);
|
||||
|
||||
moduleContentTree.addContent(moduleWriter.getSummaryTree(summaryContentTree));
|
||||
moduleContentTree.add(moduleWriter.getSummaryTree(summaryContentTree));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -163,7 +163,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
buildErrorSummary(summaryContentTree);
|
||||
buildAnnotationTypeSummary(summaryContentTree);
|
||||
|
||||
packageContentTree.addContent(summaryContentTree);
|
||||
packageContentTree.add(summaryContentTree);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,7 +35,6 @@ import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
|
||||
import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||
import jdk.javadoc.internal.doclets.toolkit.DocletException;
|
||||
import jdk.javadoc.internal.doclets.toolkit.PropertyWriter;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable;
|
||||
|
||||
import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
|
||||
|
||||
@ -138,10 +137,10 @@ public class PropertyBuilder extends AbstractMemberBuilder {
|
||||
buildPropertyComments(propertyDocTree);
|
||||
buildTagInfo(propertyDocTree);
|
||||
|
||||
propertyDetailsTree.addContent(writer.getPropertyDoc(
|
||||
propertyDetailsTree.add(writer.getPropertyDoc(
|
||||
propertyDocTree, currentProperty == lastElement));
|
||||
}
|
||||
memberDetailsTree.addContent(
|
||||
memberDetailsTree.add(
|
||||
writer.getPropertyDetails(propertyDetailsTree));
|
||||
}
|
||||
}
|
||||
@ -152,7 +151,7 @@ public class PropertyBuilder extends AbstractMemberBuilder {
|
||||
* @param propertyDocTree the content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildSignature(Content propertyDocTree) {
|
||||
propertyDocTree.addContent(writer.getSignature(currentProperty));
|
||||
propertyDocTree.add(writer.getSignature(currentProperty));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -170,7 +170,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
|
||||
buildPackageSerializedForm(serializedSummariesTree);
|
||||
}
|
||||
serializedTree.addContent(writer.getSerializedContent(
|
||||
serializedTree.add(writer.getSerializedContent(
|
||||
serializedSummariesTree));
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
* @param packageSerializedTree content tree to which the documentation will be added
|
||||
*/
|
||||
protected void buildPackageHeader(Content packageSerializedTree) {
|
||||
packageSerializedTree.addContent(writer.getPackageHeader(
|
||||
packageSerializedTree.add(writer.getPackageHeader(
|
||||
utils.getPackageName(currentPackage)));
|
||||
}
|
||||
|
||||
@ -232,10 +232,10 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
buildSerialUIDInfo(classTree);
|
||||
buildClassContent(classTree);
|
||||
|
||||
classSerializedTree.addContent(classTree);
|
||||
classSerializedTree.add(classTree);
|
||||
}
|
||||
}
|
||||
packageSerializedTree.addContent(classSerializedTree);
|
||||
packageSerializedTree.add(classSerializedTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -254,7 +254,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
break;
|
||||
}
|
||||
}
|
||||
classTree.addContent(serialUidTree);
|
||||
classTree.add(serialUidTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -270,7 +270,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
buildFieldHeader(classContentTree);
|
||||
buildSerializableFields(classContentTree);
|
||||
|
||||
classTree.addContent(classContentTree);
|
||||
classTree.add(classContentTree);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -292,18 +292,18 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
buildDeprecatedMethodInfo(methodsContentTree);
|
||||
buildMethodInfo(methodsContentTree);
|
||||
|
||||
serializableMethodTree.addContent(methodsContentTree);
|
||||
serializableMethodTree.add(methodsContentTree);
|
||||
}
|
||||
}
|
||||
if (!utils.serializationMethods(currentTypeElement).isEmpty()) {
|
||||
classContentTree.addContent(methodWriter.getSerializableMethods(
|
||||
classContentTree.add(methodWriter.getSerializableMethods(
|
||||
resources.getText("doclet.Serialized_Form_methods"),
|
||||
serializableMethodTree));
|
||||
if (utils.isSerializable(currentTypeElement) && !utils.isExternalizable(currentTypeElement)) {
|
||||
if (utils.serializationMethods(currentTypeElement).isEmpty()) {
|
||||
Content noCustomizationMsg = methodWriter.getNoCustomizationMsg(
|
||||
resources.getText("doclet.Serializable_no_customization"));
|
||||
classContentTree.addContent(methodWriter.getSerializableMethods(
|
||||
classContentTree.add(methodWriter.getSerializableMethods(
|
||||
resources.getText("doclet.Serialized_Form_methods"),
|
||||
noCustomizationMsg));
|
||||
}
|
||||
@ -402,8 +402,8 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
fieldWriter.addMemberDescription(ve, fieldsOverviewContentTree);
|
||||
fieldWriter.addMemberTags(ve, fieldsOverviewContentTree);
|
||||
}
|
||||
serializableFieldsTree.addContent(fieldsOverviewContentTree);
|
||||
classContentTree.addContent(fieldWriter.getSerializableFields(
|
||||
serializableFieldsTree.add(fieldsOverviewContentTree);
|
||||
classContentTree.add(fieldWriter.getSerializableFields(
|
||||
resources.getText("doclet.Serialized_Form_class"),
|
||||
serializableFieldsTree));
|
||||
}
|
||||
@ -431,12 +431,12 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
buildFieldDeprecationInfo(fieldsContentTree);
|
||||
buildFieldInfo(fieldsContentTree);
|
||||
|
||||
serializableFieldsTree.addContent(fieldsContentTree);
|
||||
serializableFieldsTree.add(fieldsContentTree);
|
||||
} else {
|
||||
buildSerialFieldTagsInfo(serializableFieldsTree);
|
||||
}
|
||||
}
|
||||
classContentTree.addContent(fieldWriter.getSerializableFields(
|
||||
classContentTree.add(fieldWriter.getSerializableFields(
|
||||
resources.getText("doclet.Serialized_Form_fields"),
|
||||
serializableFieldsTree));
|
||||
}
|
||||
@ -511,7 +511,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
fieldWriter.addMemberHeader(te, fieldType, "",
|
||||
tag.getName().getName().toString(), fieldsContentTree);
|
||||
fieldWriter.addMemberDescription(field, tag, fieldsContentTree);
|
||||
serializableFieldsTree.addContent(fieldsContentTree);
|
||||
serializableFieldsTree.add(fieldsContentTree);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -134,7 +134,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
ExecutableElement member = (ExecutableElement) holder;
|
||||
Content output = getTagletOutput(false, member, writer,
|
||||
member.getTypeParameters(), utils.getTypeParamTrees(member));
|
||||
output.addContent(getTagletOutput(true, member, writer,
|
||||
output.add(getTagletOutput(true, member, writer,
|
||||
member.getParameters(), utils.getParamTrees(member)));
|
||||
return output;
|
||||
} else {
|
||||
@ -160,7 +160,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
Content result = writer.getOutputInstance();
|
||||
Set<String> alreadyDocumented = new HashSet<>();
|
||||
if (!paramTags.isEmpty()) {
|
||||
result.addContent(
|
||||
result.add(
|
||||
processParamTags(holder, isParameters, paramTags,
|
||||
getRankMap(writer.configuration().utils, formalParameters), writer, alreadyDocumented)
|
||||
);
|
||||
@ -168,7 +168,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
if (alreadyDocumented.size() != formalParameters.size()) {
|
||||
//Some parameters are missing corresponding @param tags.
|
||||
//Try to inherit them.
|
||||
result.addContent(getInheritedTagletOutput(isParameters, holder,
|
||||
result.add(getInheritedTagletOutput(isParameters, holder,
|
||||
writer, formalParameters, alreadyDocumented));
|
||||
}
|
||||
return result;
|
||||
@ -204,7 +204,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
inheritedDoc.holderTag,
|
||||
lname,
|
||||
alreadyDocumented.isEmpty());
|
||||
result.addContent(content);
|
||||
result.add(content);
|
||||
}
|
||||
alreadyDocumented.add(String.valueOf(i));
|
||||
}
|
||||
@ -256,7 +256,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
: "doclet.Type_Parameters_dup_warn",
|
||||
paramName);
|
||||
}
|
||||
result.addContent(processParamTag(e, isParams, writer, dt,
|
||||
result.add(processParamTag(e, isParams, writer, dt,
|
||||
ch.getParameterName(dt), alreadyDocumented.isEmpty()));
|
||||
alreadyDocumented.add(rank);
|
||||
}
|
||||
@ -285,9 +285,9 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
String header = writer.configuration().getResources().getText(
|
||||
isParams ? "doclet.Parameters" : "doclet.TypeParameters");
|
||||
if (isFirstParam) {
|
||||
result.addContent(writer.getParamHeader(header));
|
||||
result.add(writer.getParamHeader(header));
|
||||
}
|
||||
result.addContent(writer.paramTagOutput(e, paramTag, name));
|
||||
result.add(writer.paramTagOutput(e, paramTag, name));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -259,7 +259,7 @@ public abstract class TagletWriter {
|
||||
}
|
||||
if (currentOutput != null) {
|
||||
tagletManager.seenCustomTag(taglet.getName());
|
||||
output.addContent(currentOutput);
|
||||
output.add(currentOutput);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -104,9 +104,9 @@ public class ThrowsTaglet extends BaseTaglet
|
||||
!alreadyDocumented.contains(utils.getSimpleName(klass)) &&
|
||||
!alreadyDocumented.contains(utils.getFullyQualifiedName(klass))) {
|
||||
if (alreadyDocumented.isEmpty()) {
|
||||
result.addContent(writer.getThrowsHeader());
|
||||
result.add(writer.getThrowsHeader());
|
||||
}
|
||||
result.addContent(writer.throwsTagOutput(declaredExceptionType));
|
||||
result.add(writer.throwsTagOutput(declaredExceptionType));
|
||||
alreadyDocumented.add(utils.getSimpleName(klass));
|
||||
}
|
||||
}
|
||||
@ -140,7 +140,7 @@ public class ThrowsTaglet extends BaseTaglet
|
||||
declaredExceptionTags.put(inheritedDoc.tagList, (ExecutableElement)inheritedDoc.holder);
|
||||
}
|
||||
}
|
||||
result.addContent(throwsTagsOutput(declaredExceptionTags, writer, alreadyDocumented, false));
|
||||
result.add(throwsTagsOutput(declaredExceptionTags, writer, alreadyDocumented, false));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -156,11 +156,11 @@ public class ThrowsTaglet extends BaseTaglet
|
||||
Content result = writer.getOutputInstance();
|
||||
HashSet<String> alreadyDocumented = new HashSet<>();
|
||||
if (!tagsMap.isEmpty()) {
|
||||
result.addContent(throwsTagsOutput(tagsMap, writer, alreadyDocumented, true));
|
||||
result.add(throwsTagsOutput(tagsMap, writer, alreadyDocumented, true));
|
||||
}
|
||||
result.addContent(inheritThrowsDocumentation(holder,
|
||||
result.add(inheritThrowsDocumentation(holder,
|
||||
execHolder.getThrownTypes(), alreadyDocumented, writer));
|
||||
result.addContent(linkToUndocumentedDeclaredExceptions(
|
||||
result.add(linkToUndocumentedDeclaredExceptions(
|
||||
execHolder.getThrownTypes(), alreadyDocumented, writer));
|
||||
return result;
|
||||
}
|
||||
@ -192,9 +192,9 @@ public class ThrowsTaglet extends BaseTaglet
|
||||
continue;
|
||||
}
|
||||
if (alreadyDocumented.isEmpty()) {
|
||||
result.addContent(writer.getThrowsHeader());
|
||||
result.add(writer.getThrowsHeader());
|
||||
}
|
||||
result.addContent(writer.throwsTagOutput(e, dt));
|
||||
result.add(writer.throwsTagOutput(e, dt));
|
||||
alreadyDocumented.add(te != null
|
||||
? utils.getFullyQualifiedName(te)
|
||||
: excName);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -132,7 +132,7 @@ public class UserTaglet implements Taglet {
|
||||
*/
|
||||
public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer){
|
||||
Content output = writer.getOutputInstance();
|
||||
output.addContent(new RawHtml(userTaglet.toString(Collections.singletonList(tag), element)));
|
||||
output.add(new RawHtml(userTaglet.toString(Collections.singletonList(tag), element)));
|
||||
return output;
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ public class UserTaglet implements Taglet {
|
||||
if (!tags.isEmpty()) {
|
||||
String tagString = userTaglet.toString(tags, holder);
|
||||
if (tagString != null) {
|
||||
output.addContent(new RawHtml(tagString));
|
||||
output.add(new RawHtml(tagString));
|
||||
}
|
||||
}
|
||||
return output;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -81,7 +81,7 @@ public abstract class LinkFactory {
|
||||
// handles primitives, no types and error types
|
||||
@Override
|
||||
protected Content defaultAction(TypeMirror type, LinkInfo linkInfo) {
|
||||
link.addContent(utils.getTypeName(type, false));
|
||||
link.add(utils.getTypeName(type, false));
|
||||
return link;
|
||||
}
|
||||
|
||||
@ -96,14 +96,14 @@ public abstract class LinkFactory {
|
||||
currentDepth--;
|
||||
if (utils.isAnnotated(type)) {
|
||||
linkInfo.type = type;
|
||||
link.addContent(" ");
|
||||
link.addContent(getTypeAnnotationLinks(linkInfo));
|
||||
link.add(" ");
|
||||
link.add(getTypeAnnotationLinks(linkInfo));
|
||||
}
|
||||
// use vararg if required
|
||||
if (linkInfo.isVarArg && currentDepth == 0) {
|
||||
link.addContent("...");
|
||||
link.add("...");
|
||||
} else {
|
||||
link.addContent("[]");
|
||||
link.add("[]");
|
||||
}
|
||||
return link;
|
||||
}
|
||||
@ -111,25 +111,25 @@ public abstract class LinkFactory {
|
||||
@Override
|
||||
public Content visitWildcard(WildcardType type, LinkInfo linkInfo) {
|
||||
linkInfo.isTypeBound = true;
|
||||
link.addContent("?");
|
||||
link.add("?");
|
||||
TypeMirror extendsBound = type.getExtendsBound();
|
||||
if (extendsBound != null) {
|
||||
link.addContent(" extends ");
|
||||
link.add(" extends ");
|
||||
setBoundsLinkInfo(linkInfo, extendsBound);
|
||||
link.addContent(getLink(linkInfo));
|
||||
link.add(getLink(linkInfo));
|
||||
}
|
||||
TypeMirror superBound = type.getSuperBound();
|
||||
if (superBound != null) {
|
||||
link.addContent(" super ");
|
||||
link.add(" super ");
|
||||
setBoundsLinkInfo(linkInfo, superBound);
|
||||
link.addContent(getLink(linkInfo));
|
||||
link.add(getLink(linkInfo));
|
||||
}
|
||||
return link;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Content visitTypeVariable(TypeVariable type, LinkInfo linkInfo) {
|
||||
link.addContent(getTypeAnnotationLinks(linkInfo));
|
||||
link.add(getTypeAnnotationLinks(linkInfo));
|
||||
linkInfo.isTypeBound = true;
|
||||
TypeVariable typevariable = (utils.isArrayType(type))
|
||||
? (TypeVariable) componentType
|
||||
@ -138,12 +138,12 @@ public abstract class LinkFactory {
|
||||
if ((!linkInfo.excludeTypeParameterLinks) && utils.isTypeElement(owner)) {
|
||||
linkInfo.typeElement = (TypeElement) owner;
|
||||
Content label = newContent();
|
||||
label.addContent(utils.getTypeName(type, false));
|
||||
label.add(utils.getTypeName(type, false));
|
||||
linkInfo.label = label;
|
||||
link.addContent(getClassLink(linkInfo));
|
||||
link.add(getClassLink(linkInfo));
|
||||
} else {
|
||||
// No need to link method type parameters.
|
||||
link.addContent(utils.getTypeName(typevariable, false));
|
||||
link.add(utils.getTypeName(typevariable, false));
|
||||
}
|
||||
|
||||
if (!linkInfo.excludeTypeBounds) {
|
||||
@ -159,9 +159,9 @@ public abstract class LinkFactory {
|
||||
!utils.isAnnotated(bound)) {
|
||||
continue;
|
||||
}
|
||||
link.addContent(more ? " & " : " extends ");
|
||||
link.add(more ? " & " : " extends ");
|
||||
setBoundsLinkInfo(linkInfo, bound);
|
||||
link.addContent(getLink(linkInfo));
|
||||
link.add(getLink(linkInfo));
|
||||
more = true;
|
||||
}
|
||||
}
|
||||
@ -173,16 +173,16 @@ public abstract class LinkFactory {
|
||||
if (linkInfo.isTypeBound && linkInfo.excludeTypeBoundsLinks) {
|
||||
// Since we are excluding type parameter links, we should not
|
||||
// be linking to the type bound.
|
||||
link.addContent(utils.getTypeName(type, false));
|
||||
link.addContent(getTypeParameterLinks(linkInfo));
|
||||
link.add(utils.getTypeName(type, false));
|
||||
link.add(getTypeParameterLinks(linkInfo));
|
||||
return link;
|
||||
} else {
|
||||
link = newContent();
|
||||
link.addContent(getTypeAnnotationLinks(linkInfo));
|
||||
link.add(getTypeAnnotationLinks(linkInfo));
|
||||
linkInfo.typeElement = utils.asTypeElement(type);
|
||||
link.addContent(getClassLink(linkInfo));
|
||||
link.add(getClassLink(linkInfo));
|
||||
if (linkInfo.includeTypeAsSepLink) {
|
||||
link.addContent(getTypeParameterLinks(linkInfo, false));
|
||||
link.add(getTypeParameterLinks(linkInfo, false));
|
||||
}
|
||||
}
|
||||
return link;
|
||||
@ -191,9 +191,9 @@ public abstract class LinkFactory {
|
||||
return linkVisitor.visit(linkInfo.type, linkInfo);
|
||||
} else if (linkInfo.typeElement != null) {
|
||||
Content link = newContent();
|
||||
link.addContent(getClassLink(linkInfo));
|
||||
link.add(getClassLink(linkInfo));
|
||||
if (linkInfo.includeTypeAsSepLink) {
|
||||
link.addContent(getTypeParameterLinks(linkInfo, false));
|
||||
link.add(getTypeParameterLinks(linkInfo, false));
|
||||
}
|
||||
return link;
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -145,11 +145,11 @@ public abstract class LinkInfo {
|
||||
return label;
|
||||
} else if (isLinkable()) {
|
||||
Content tlabel = newContent();
|
||||
tlabel.addContent(configuration.utils.getSimpleName(typeElement));
|
||||
tlabel.add(configuration.utils.getSimpleName(typeElement));
|
||||
return tlabel;
|
||||
} else {
|
||||
Content tlabel = newContent();
|
||||
tlabel.addContent(configuration.getClassName(typeElement));
|
||||
tlabel.add(configuration.getClassName(typeElement));
|
||||
return tlabel;
|
||||
}
|
||||
}
|
||||
|
@ -76,31 +76,31 @@ public class TestHtmlDocument extends JavadocTester {
|
||||
HtmlTree title = new HtmlTree(HtmlTag.TITLE);
|
||||
// String content within the document
|
||||
StringContent titleContent = new StringContent("Markup test");
|
||||
title.addContent(titleContent);
|
||||
head.addContent(title);
|
||||
title.add(titleContent);
|
||||
head.add(title);
|
||||
// Test META tag
|
||||
HtmlTree meta = new HtmlTree(HtmlTag.META);
|
||||
meta.addAttr(HtmlAttr.NAME, "keywords");
|
||||
meta.addAttr(HtmlAttr.CONTENT, "testContent");
|
||||
head.addContent(meta);
|
||||
meta.put(HtmlAttr.NAME, "keywords");
|
||||
meta.put(HtmlAttr.CONTENT, "testContent");
|
||||
head.add(meta);
|
||||
// Test invalid META tag
|
||||
HtmlTree invmeta = new HtmlTree(HtmlTag.META);
|
||||
head.addContent(invmeta);
|
||||
head.add(invmeta);
|
||||
// Test LINK tag
|
||||
HtmlTree link = new HtmlTree(HtmlTag.LINK);
|
||||
link.addAttr(HtmlAttr.REL, "testRel");
|
||||
link.addAttr(HtmlAttr.HREF, "testLink.html");
|
||||
head.addContent(link);
|
||||
link.put(HtmlAttr.REL, "testRel");
|
||||
link.put(HtmlAttr.HREF, "testLink.html");
|
||||
head.add(link);
|
||||
// Test invalid LINK tag
|
||||
HtmlTree invlink = new HtmlTree(HtmlTag.LINK);
|
||||
head.addContent(invlink);
|
||||
html.addContent(head);
|
||||
head.add(invlink);
|
||||
html.add(head);
|
||||
// Comment within the document
|
||||
Comment bodyMarker = new Comment("======== START OF BODY ========");
|
||||
html.addContent(bodyMarker);
|
||||
html.add(bodyMarker);
|
||||
HtmlTree body = new HtmlTree(HtmlTag.BODY);
|
||||
Comment pMarker = new Comment("======== START OF PARAGRAPH ========");
|
||||
body.addContent(pMarker);
|
||||
body.add(pMarker);
|
||||
HtmlTree p = new HtmlTree(HtmlTag.P);
|
||||
StringContent bodyContent = new StringContent(
|
||||
"This document is generated from sample source code and HTML " +
|
||||
@ -108,41 +108,41 @@ public class TestHtmlDocument extends JavadocTester {
|
||||
"subclasses, subinterfaces, nested classes, nested interfaces," +
|
||||
"inheriting from other packages, constructors, fields," +
|
||||
"methods, and so forth. ");
|
||||
p.addContent(bodyContent);
|
||||
p.add(bodyContent);
|
||||
StringContent anchorContent = new StringContent("Click Here");
|
||||
p.addContent(HtmlTree.A("testLink.html", anchorContent));
|
||||
p.add(HtmlTree.A("testLink.html", anchorContent));
|
||||
StringContent pContent = new StringContent(" to <test> out a link.");
|
||||
p.addContent(pContent);
|
||||
body.addContent(p);
|
||||
p.add(pContent);
|
||||
body.add(p);
|
||||
HtmlTree p1 = new HtmlTree(HtmlTag.P);
|
||||
// Test another version of A tag.
|
||||
HtmlTree anchor = new HtmlTree(HtmlTag.A);
|
||||
anchor.addAttr(HtmlAttr.HREF, "testLink.html");
|
||||
anchor.addAttr(HtmlAttr.ID, "Another version of a tag");
|
||||
p1.addContent(anchor);
|
||||
body.addContent(p1);
|
||||
anchor.put(HtmlAttr.HREF, "testLink.html");
|
||||
anchor.put(HtmlAttr.ID, "Another version of a tag");
|
||||
p1.add(anchor);
|
||||
body.add(p1);
|
||||
// Test for empty tags.
|
||||
HtmlTree dl = new HtmlTree(HtmlTag.DL);
|
||||
html.addContent(dl);
|
||||
html.add(dl);
|
||||
// Test for empty nested tags.
|
||||
HtmlTree dlTree = new HtmlTree(HtmlTag.DL);
|
||||
dlTree.addContent(new HtmlTree(HtmlTag.DT));
|
||||
dlTree.addContent(new HtmlTree (HtmlTag.DD));
|
||||
html.addContent(dlTree);
|
||||
dlTree.add(new HtmlTree(HtmlTag.DT));
|
||||
dlTree.add(new HtmlTree (HtmlTag.DD));
|
||||
html.add(dlTree);
|
||||
HtmlTree dlDisplay = new HtmlTree(HtmlTag.DL);
|
||||
dlDisplay.addContent(new HtmlTree(HtmlTag.DT));
|
||||
dlDisplay.add(new HtmlTree(HtmlTag.DT));
|
||||
HtmlTree dd = new HtmlTree (HtmlTag.DD);
|
||||
StringContent ddContent = new StringContent("Test DD");
|
||||
dd.addContent(ddContent);
|
||||
dlDisplay.addContent(dd);
|
||||
body.addContent(dlDisplay);
|
||||
dd.add(ddContent);
|
||||
dlDisplay.add(dd);
|
||||
body.add(dlDisplay);
|
||||
StringContent emptyString = new StringContent("");
|
||||
body.addContent(emptyString);
|
||||
body.add(emptyString);
|
||||
Comment emptyComment = new Comment("");
|
||||
body.addContent(emptyComment);
|
||||
body.add(emptyComment);
|
||||
HtmlTree hr = new HtmlTree(HtmlTag.HR);
|
||||
body.addContent(hr);
|
||||
html.addContent(body);
|
||||
body.add(hr);
|
||||
html.add(body);
|
||||
HtmlDocument htmlDoc = new HtmlDocument(html);
|
||||
return htmlDoc.toString();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user