Skip to content
Permalink
Browse files
8241030: rename HtmlTag to TagName
Reviewed-by: prappo
  • Loading branch information
jonathan-gibbons committed Mar 18, 2020
1 parent 34b9ac2 commit ea367322f28b428b54e1eef5d736507d1e4dd8c6
Showing with 278 additions and 271 deletions.
  1. +7 −7 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java
  2. +6 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java
  3. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java
  4. +4 −4 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
  5. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java
  6. +6 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
  7. +4 −4 ...k.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java
  8. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java
  9. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java
  10. +16 −16 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java
  11. +14 −14 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java
  12. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
  13. +6 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java
  14. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java
  15. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java
  16. +7 −7 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
  17. +7 −7 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java
  18. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java
  19. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java
  20. +5 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java
  21. +4 −4 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java
  22. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SingleIndexWriter.java
  23. +4 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java
  24. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java
  25. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
  26. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java
  27. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
  28. +8 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java
  29. +83 −54 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
  30. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Script.java
  31. +10 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Table.java
  32. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/TableHeader.java
  33. +28 −60 ...adoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/{HtmlTag.java → TagName.java}
  34. +4 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/package-info.java
  35. +19 −19 test/langtools/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java
@@ -45,7 +45,7 @@
import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category;
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -238,7 +238,7 @@ protected void addDescription(ModuleElement mdle, Content dlTree, SearchIndexIte
dt.add(contents.module_);
dt.add(" " + moduleName);
dlTree.add(dt);
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
addSummaryComment(mdle, dd);
dlTree.add(dd);
}
@@ -262,7 +262,7 @@ protected void addDescription(PackageElement pkg, Content dlTree, SearchIndexIte
dt.add(contents.package_);
dt.add(" " + utils.getPackageName(pkg));
dlTree.add(dt);
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
addSummaryComment(pkg, dd);
dlTree.add(dd);
}
@@ -284,7 +284,7 @@ protected void addDescription(TypeElement typeElement, Content dlTree, SearchInd
dt.add(" - ");
addClassInfo(typeElement, dt);
dlTree.add(dt);
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
addComment(typeElement, dd);
dlTree.add(dd);
}
@@ -334,7 +334,7 @@ protected void addDescription(Element member, Content dlTree, SearchIndexItem si
dt.add(" - ");
addMemberDesc(member, dt);
dlTree.add(dt);
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
addComment(member, dd);
dlTree.add(dd);
}
@@ -347,7 +347,7 @@ protected void addDescription(SearchIndexItem sii, Content dlTree) {
dt.add(" - ");
dt.add(contents.getContent("doclet.Search_tag_in", sii.getHolder()));
dlTree.add(dt);
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
if (sii.getDescription().isEmpty()) {
dd.add(Entity.NO_BREAK_SPACE);
} else {
@@ -368,7 +368,7 @@ protected void addDescription(SearchIndexItem sii, Content dlTree) {
protected void addComment(Element element, Content contentTree) {
List<? extends DocTree> tags;
Content span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(element));
HtmlTree div = new HtmlTree(HtmlTag.DIV);
HtmlTree div = new HtmlTree(TagName.DIV);
div.setStyle(HtmlStyle.deprecationBlock);
if (utils.isDeprecated(element)) {
div.add(span);
@@ -43,7 +43,7 @@
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.markup.Links;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -205,7 +205,7 @@ protected abstract void addInheritedSummaryLink(TypeElement typeElement,
*/
protected void addModifierAndType(Element member, TypeMirror type,
Content tdSummaryType) {
HtmlTree code = new HtmlTree(HtmlTag.CODE);
HtmlTree code = new HtmlTree(TagName.CODE);
addModifier(member, code);
if (type == null) {
code.add(utils.isClass(member) ? "class" : "interface");
@@ -220,7 +220,7 @@ protected void addModifierAndType(Element member, TypeMirror type,
code.add(typeParameters);
//Code to avoid ugly wrapping in member summary table.
if (typeParameters.charCount() > 10) {
code.add(new HtmlTree(HtmlTag.BR));
code.add(new HtmlTree(TagName.BR));
} else {
code.add(Entity.NO_BREAK_SPACE);
}
@@ -347,7 +347,7 @@ protected void addUseInfo(List<? extends Element> mems, Content heading, Content
&& !utils.isClass(element)
&& !utils.isInterface(element)
&& !utils.isAnnotationType(element)) {
HtmlTree name = new HtmlTree(HtmlTag.SPAN);
HtmlTree name = new HtmlTree(TagName.SPAN);
name.setStyle(HtmlStyle.typeNameLabel);
name.add(name(te) + ".");
typeContent.add(name);
@@ -435,7 +435,7 @@ public Content getInheritedSummaryHeader(TypeElement tElement) {
*/
@Override
public Content getInheritedSummaryLinksTree() {
return new HtmlTree(HtmlTag.CODE);
return new HtmlTree(TagName.CODE);
}

/**
@@ -581,7 +581,7 @@ Content toContent() {
}

// Name
HtmlTree nameSpan = new HtmlTree(HtmlTag.SPAN);
HtmlTree nameSpan = new HtmlTree(TagName.SPAN);
nameSpan.setStyle(HtmlStyle.memberName);
if (options.linkSource()) {
Content name = new StringContent(name(element));
@@ -30,7 +30,7 @@
import javax.lang.model.element.TypeElement;

import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.toolkit.Content;
import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
@@ -82,9 +82,9 @@ protected AbstractTreeWriter(HtmlConfiguration configuration,
protected void addLevelInfo(TypeElement parent, Collection<TypeElement> collection,
boolean isEnum, Content contentTree) {
if (!collection.isEmpty()) {
Content ul = new HtmlTree(HtmlTag.UL);
Content ul = new HtmlTree(TagName.UL);
for (TypeElement local : collection) {
HtmlTree li = new HtmlTree(HtmlTag.LI);
HtmlTree li = new HtmlTree(TagName.LI);
li.setStyle(HtmlStyle.circle);
addPartialInfo(local, li);
addExtendsImplements(parent, local, li);
@@ -35,7 +35,7 @@
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -88,7 +88,7 @@ public Content getHeader(String header) {
navBar.setUserHeader(getUserHeaderFooter(true));
headerContent.add(navBar.getContent(Navigation.Position.TOP));

HtmlTree div = new HtmlTree(HtmlTag.DIV);
HtmlTree div = new HtmlTree(TagName.DIV);
div.setStyle(HtmlStyle.header);
if (configuration.showModules) {
ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(annotationType);
@@ -156,9 +156,9 @@ public Content getAnnotationInfo(Content annotationInfoTree) {

@Override
public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree) {
Content hr = new HtmlTree(HtmlTag.HR);
Content hr = new HtmlTree(TagName.HR);
annotationInfoTree.add(hr);
Content pre = new HtmlTree(HtmlTag.PRE);
Content pre = new HtmlTree(TagName.PRE);
addAnnotationInfo(annotationType, pre);
pre.add(modifiers);
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
@@ -43,7 +43,7 @@

import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -305,7 +305,7 @@ protected void addPackageAnnotationList(Content contentTree) {
* @param contentTree the content tree to which the class elements will be added
*/
protected void addClassList(Content contentTree) {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
HtmlTree ul = new HtmlTree(TagName.UL);
ul.setStyle(HtmlStyle.blockList);
for (PackageElement pkg : pkgSet) {
HtmlTree htmlTree = HtmlTree.SECTION(HtmlStyle.detail).setId(getPackageAnchorName(pkg));
@@ -437,7 +437,7 @@ protected HtmlTree getClassUseHeader() {
headerContent.add(navBar.getContent(Navigation.Position.TOP));
ContentBuilder headingContent = new ContentBuilder();
headingContent.add(contents.getContent("doclet.ClassUse_Title", cltype));
headingContent.add(new HtmlTree(HtmlTag.BR));
headingContent.add(new HtmlTree(TagName.BR));
headingContent.add(clname);
Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING,
HtmlStyle.title, headingContent);
@@ -45,7 +45,7 @@
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -115,7 +115,7 @@ public Content getHeader(String header) {
navBar.setMemberSummaryBuilder(configuration.getBuilderFactory().getMemberSummaryBuilder(this));
navBar.setUserHeader(getUserHeaderFooter(true));
headerContent.add(navBar.getContent(Navigation.Position.TOP));
HtmlTree div = new HtmlTree(HtmlTag.DIV);
HtmlTree div = new HtmlTree(TagName.DIV);
div.setStyle(HtmlStyle.header);
if (configuration.showModules) {
ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(typeElement);
@@ -192,9 +192,9 @@ protected TypeElement getCurrentPageElement() {

@Override @SuppressWarnings("preview")
public void addClassSignature(String modifiers, Content classInfoTree) {
Content hr = new HtmlTree(HtmlTag.HR);
Content hr = new HtmlTree(TagName.HR);
classInfoTree.add(hr);
Content pre = new HtmlTree(HtmlTag.PRE);
Content pre = new HtmlTree(TagName.PRE);
addAnnotationInfo(typeElement, pre);
pre.add(modifiers);
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
@@ -443,7 +443,7 @@ public Void visitType(TypeElement e, Void p) {
dl.add(HtmlTree.DT(utils.isInterface(e)
? contents.enclosingInterfaceLabel
: contents.enclosingClassLabel));
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
dd.add(getLink(new LinkInfoImpl(configuration,
LinkInfoImpl.Kind.CLASS, e)));
dl.add(dd);
@@ -458,7 +458,7 @@ public void addFunctionalInterfaceInfo (Content classInfoTree) {
if (isFunctionalInterface()) {
HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
dl.add(HtmlTree.DT(contents.functionalInterface));
Content dd = new HtmlTree(HtmlTag.DD);
Content dd = new HtmlTree(TagName.DD);
dd.add(contents.functionalInterfaceMessage);
dl.add(dd);
classInfoTree.add(dl);
@@ -37,7 +37,7 @@
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -108,7 +108,7 @@ public Content getHeader() {

@Override
public Content getContentsHeader() {
return new HtmlTree(HtmlTag.UL);
return new HtmlTree(TagName.UL);
}

@Override
@@ -176,7 +176,7 @@ public void addPackageName(PackageElement pkg, Content summariesTree, boolean fi

@Override
public Content getClassConstantHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
HtmlTree ul = new HtmlTree(TagName.UL);
ul.setStyle(HtmlStyle.blockList);
return ul;
}
@@ -227,7 +227,7 @@ public void addConstantMembers(TypeElement typeElement, Collection<VariableEleme
private Content getTypeColumn(VariableElement member) {
Content typeContent = new ContentBuilder();
String id = currentTypeElement.getQualifiedName() + "." + member.getSimpleName();
Content code = new HtmlTree(HtmlTag.CODE).setId(id);
Content code = new HtmlTree(TagName.CODE).setId(id);
for (Modifier mod : member.getModifiers()) {
Content modifier = new StringContent(mod.toString());
code.add(modifier);
@@ -35,7 +35,7 @@
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
import jdk.javadoc.internal.doclets.formats.html.markup.Table;
@@ -218,7 +218,7 @@ public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedT
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
if (foundNonPubConstructor) {
Content code = new HtmlTree(HtmlTag.CODE);
Content code = new HtmlTree(TagName.CODE);
if (utils.isProtected(member)) {
code.add("protected ");
} else if (utils.isPrivate(member)) {
@@ -39,7 +39,7 @@
import com.sun.source.doctree.DocTree;
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.TagName;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
@@ -335,7 +335,7 @@ public Content getContentsList(DeprecatedAPIListBuilder deprapi) {
Content headingContent = contents.contentsHeading;
div.add(HtmlTree.HEADING_TITLE(Headings.CONTENT_HEADING,
headingContent));
Content ul = new HtmlTree(HtmlTag.UL);
Content ul = new HtmlTree(TagName.UL);
for (DeprElementKind kind : DeprElementKind.values()) {
addIndexLink(deprapi, kind, ul);
}

0 comments on commit ea36732

Please sign in to comment.