8072945: Javadoc should generate valid and compliant HTML5 output
Reviewed-by: jjg, ksrini
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/Checker.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/Checker.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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,6 +108,7 @@
public enum Flag {
TABLE_HAS_CAPTION,
HAS_ELEMENT,
+ HAS_HEADING,
HAS_INLINE_TAG,
HAS_TEXT,
REPORTED_BAD_INLINE
@@ -282,6 +283,8 @@
final HtmlTag t = HtmlTag.get(treeName);
if (t == null) {
env.messages.error(HTML, tree, "dc.tag.unknown", treeName);
+ } else if (t.allowedVersion != HtmlVersion.ALL && t.allowedVersion != env.htmlVersion) {
+ env.messages.error(HTML, tree, "dc.tag.not.supported", treeName);
} else {
boolean done = false;
for (TagStackItem tsi: tagStack) {
@@ -345,6 +348,12 @@
parent.flags.add(Flag.TABLE_HAS_CAPTION);
break;
+ case H1: case H2: case H3: case H4: case H5: case H6:
+ if (parent != null && (parent.tag == HtmlTag.SECTION || parent.tag == HtmlTag.ARTICLE)) {
+ parent.flags.add(Flag.HAS_HEADING);
+ }
+ break;
+
case IMG:
if (!top.attrs.contains(HtmlTag.Attr.ALT))
env.messages.error(ACCESSIBILITY, tree, "dc.no.alt.attr.for.image");
@@ -460,6 +469,14 @@
env.messages.error(ACCESSIBILITY, tree,
"dc.no.summary.or.caption.for.table");
}
+ break;
+
+ case SECTION:
+ case ARTICLE:
+ if (env.htmlVersion == HtmlVersion.HTML5 && !top.flags.contains(Flag.HAS_HEADING)) {
+ env.messages.error(HTML, tree, "dc.tag.requires.heading", treeName);
+ }
+ break;
}
warnIfEmpty(top, tree);
tagStack.pop();
@@ -519,25 +536,21 @@
Name name = tree.getName();
HtmlTag.Attr attr = currTag.getAttr(name);
if (attr != null) {
+ if (env.htmlVersion == HtmlVersion.HTML4 && attr.name().contains("-")) {
+ env.messages.error(HTML, tree, "dc.attr.not.supported.html4", name);
+ }
boolean first = tagStack.peek().attrs.add(attr);
if (!first)
env.messages.error(HTML, tree, "dc.attr.repeated", name);
}
AttrKind k = currTag.getAttrKind(name);
- switch (k) {
- case OK:
+ switch (env.htmlVersion) {
+ case HTML4:
+ validateHtml4Attrs(tree, name, k);
break;
- case INVALID:
- env.messages.error(HTML, tree, "dc.attr.unknown", name);
- break;
-
- case OBSOLETE:
- env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete", name);
- break;
-
- case USE_CSS:
- env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete.use.css", name);
+ case HTML5:
+ validateHtml5Attrs(tree, name, k);
break;
}
@@ -590,6 +603,20 @@
}
}
break;
+
+ case BORDER:
+ if (currTag == HtmlTag.TABLE) {
+ String v = getAttrValue(tree);
+ try {
+ if (env.htmlVersion == HtmlVersion.HTML5
+ && (v == null || (!v.isEmpty() && Integer.parseInt(v) != 1))) {
+ env.messages.error(HTML, tree, "dc.attr.table.border.html5", attr);
+ }
+ } catch (NumberFormatException ex) {
+ env.messages.error(HTML, tree, "dc.attr.table.border.html5", attr);
+ }
+ }
+ break;
}
}
}
@@ -599,6 +626,45 @@
return super.visitAttribute(tree, ignore);
}
+ private void validateHtml4Attrs(AttributeTree tree, Name name, AttrKind k) {
+ switch (k) {
+ case ALL:
+ case HTML4:
+ break;
+
+ case INVALID:
+ env.messages.error(HTML, tree, "dc.attr.unknown", name);
+ break;
+
+ case OBSOLETE:
+ env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete", name);
+ break;
+
+ case USE_CSS:
+ env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete.use.css", name);
+ break;
+
+ case HTML5:
+ env.messages.error(HTML, tree, "dc.attr.not.supported.html4", name);
+ break;
+ }
+ }
+
+ private void validateHtml5Attrs(AttributeTree tree, Name name, AttrKind k) {
+ switch (k) {
+ case ALL:
+ case HTML5:
+ break;
+
+ case INVALID:
+ case OBSOLETE:
+ case USE_CSS:
+ case HTML4:
+ env.messages.error(HTML, tree, "dc.attr.not.supported.html5", name);
+ break;
+ }
+ }
+
private boolean checkAnchor(String name) {
Element e = getEnclosingPackageOrClass(env.currElement);
if (e == null)
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -80,6 +80,7 @@
private static final String STATS = "-stats";
public static final String XIMPLICIT_HEADERS = "-XimplicitHeaders:";
public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:";
+ public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:";
public static final String XCHECK_PACKAGE = "-XcheckPackage:";
public static final String SEPARATOR = ",";
@@ -210,6 +211,14 @@
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
+ } else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
+ String argsVersion = arg.substring(arg.indexOf(":") + 1);
+ HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
+ if (htmlVersion != null) {
+ env.setHtmlVersion(htmlVersion);
+ } else {
+ throw new BadArgs("dc.bad.value.for.option", arg, argsVersion);
+ }
} else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help")
|| arg.equals("-?") || arg.equals("-usage")) {
needHelp = true;
@@ -274,6 +283,14 @@
env.setImplicitHeaders(Character.digit(ch, 10));
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
+ } else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
+ String argsVersion = arg.substring(arg.indexOf(":") + 1);
+ HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
+ if (htmlVersion != null) {
+ env.setHtmlVersion(htmlVersion);
+ } else {
+ throw new IllegalArgumentException(argsVersion);
+ }
} else if (arg.startsWith(XCHECK_PACKAGE)) {
env.setCheckPackages(arg.substring(arg.indexOf(":") + 1));
} else
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/Env.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/Env.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -99,6 +99,8 @@
Set<Pattern> includePackages;
Set<Pattern> excludePackages;
+ HtmlVersion htmlVersion = HtmlVersion.HTML4;
+
// Utility classes
DocTrees trees;
Elements elements;
@@ -193,6 +195,10 @@
return true;
}
+ void setHtmlVersion(HtmlVersion version) {
+ htmlVersion = version;
+ }
+
/** Set the current declaration and its doc comment. */
void setCurrent(TreePath path, DocCommentTree comment) {
currPath = path;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -51,26 +51,37 @@
*
* @see <a href="http://www.w3.org/TR/REC-html40/">HTML 4.01 Specification</a>
* @see <a href="http://www.w3.org/TR/html5/">HTML 5 Specification</a>
+ * @see <a href="http://www.w3.org/TR/wai-aria/ ">WAI-ARIA Specification</a>
+ * @see <a href="http://www.w3.org/TR/aria-in-html/#recommendations-table">WAI-ARIA Recommendations Table</a>
* @author Bhavesh Patel
* @author Jonathan Gibbons (revised)
*/
public enum HtmlTag {
A(BlockType.INLINE, EndKind.REQUIRED,
- attrs(AttrKind.OK, HREF, TARGET, NAME)),
+ attrs(AttrKind.ALL, HREF, TARGET, ID),
+ attrs(AttrKind.HTML4, REV, CHARSET, SHAPE, COORDS, NAME)),
ABBR(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
- ACRONYM(BlockType.INLINE, EndKind.REQUIRED,
+ ACRONYM(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
ADDRESS(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
+ ARTICLE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
+
+ ASIDE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
+
B(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
- BIG(BlockType.INLINE, EndKind.REQUIRED,
+ BDI(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
+
+ BIG(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)),
BLOCKQUOTE(BlockType.BLOCK, EndKind.REQUIRED,
@@ -82,9 +93,10 @@
attrs(AttrKind.USE_CSS, CLEAR)),
CAPTION(BlockType.TABLE_ITEM, EndKind.REQUIRED,
- EnumSet.of(Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT)),
+ EnumSet.of(Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT),
+ attrs(AttrKind.USE_CSS, ALIGN)),
- CENTER(BlockType.BLOCK, EndKind.REQUIRED,
+ CENTER(HtmlVersion.HTML4, BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
CITE(BlockType.INLINE, EndKind.REQUIRED,
@@ -93,18 +105,30 @@
CODE(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
+ COL(BlockType.TABLE_ITEM, EndKind.NONE,
+ attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF, VALIGN, WIDTH)),
+
+ COLGROUP(BlockType.TABLE_ITEM, EndKind.REQUIRED,
+ attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF, VALIGN, WIDTH)) {
+ @Override
+ public boolean accepts(HtmlTag t) {
+ return (t == COL);
+ }
+ },
+
DD(BlockType.LIST_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT)),
DEL(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST),
- attrs(AttrKind.OK, Attr.CITE, Attr.DATETIME)),
+ attrs(AttrKind.ALL, Attr.CITE, Attr.DATETIME)),
DFN(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
DIV(BlockType.BLOCK, EndKind.REQUIRED,
- EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
+ attrs(AttrKind.USE_CSS, ALIGN)),
DL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
@@ -121,49 +145,95 @@
EM(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.NO_NEST)),
- FONT(BlockType.INLINE, EndKind.REQUIRED, // tag itself is deprecated
+ FONT(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED, // tag itself is deprecated
EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.USE_CSS, SIZE, COLOR, FACE)),
- FRAME(BlockType.OTHER, EndKind.NONE),
+ FOOTER(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)) {
+ @Override
+ public boolean accepts(HtmlTag t) {
+ switch (t) {
+ case HEADER: case FOOTER: case MAIN:
+ return false;
+ default:
+ return (t.blockType == BlockType.BLOCK) || (t.blockType == BlockType.INLINE);
+ }
+ }
+ },
- FRAMESET(BlockType.OTHER, EndKind.REQUIRED),
+ FIGURE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
- H1(BlockType.BLOCK, EndKind.REQUIRED),
- H2(BlockType.BLOCK, EndKind.REQUIRED),
- H3(BlockType.BLOCK, EndKind.REQUIRED),
- H4(BlockType.BLOCK, EndKind.REQUIRED),
- H5(BlockType.BLOCK, EndKind.REQUIRED),
- H6(BlockType.BLOCK, EndKind.REQUIRED),
+ FIGCAPTION(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED),
+
+ FRAME(HtmlVersion.HTML4, BlockType.OTHER, EndKind.NONE),
+
+ FRAMESET(HtmlVersion.HTML4, BlockType.OTHER, EndKind.REQUIRED),
+
+ H1(BlockType.BLOCK, EndKind.REQUIRED,
+ attrs(AttrKind.USE_CSS, ALIGN)),
+ H2(BlockType.BLOCK, EndKind.REQUIRED,
+ attrs(AttrKind.USE_CSS, ALIGN)),
+ H3(BlockType.BLOCK, EndKind.REQUIRED,
+ attrs(AttrKind.USE_CSS, ALIGN)),
+ H4(BlockType.BLOCK, EndKind.REQUIRED,
+ attrs(AttrKind.USE_CSS, ALIGN)),
+ H5(BlockType.BLOCK, EndKind.REQUIRED,
+ attrs(AttrKind.USE_CSS, ALIGN)),
+ H6(BlockType.BLOCK, EndKind.REQUIRED,
+ attrs(AttrKind.USE_CSS, ALIGN)),
HEAD(BlockType.OTHER, EndKind.REQUIRED),
+ HEADER(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)) {
+ @Override
+ public boolean accepts(HtmlTag t) {
+ switch (t) {
+ case HEADER: case FOOTER: case MAIN:
+ return false;
+ default:
+ return (t.blockType == BlockType.BLOCK) || (t.blockType == BlockType.INLINE);
+ }
+ }
+ },
+
HR(BlockType.BLOCK, EndKind.NONE,
- attrs(AttrKind.OK, WIDTH)), // OK in 4.01; not allowed in 5
+ attrs(AttrKind.HTML4, WIDTH),
+ attrs(AttrKind.USE_CSS, ALIGN, NOSHADE, SIZE)),
HTML(BlockType.OTHER, EndKind.REQUIRED),
I(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
+ IFRAME(BlockType.OTHER, EndKind.REQUIRED),
+
IMG(BlockType.INLINE, EndKind.NONE,
- attrs(AttrKind.OK, SRC, ALT, HEIGHT, WIDTH),
+ attrs(AttrKind.ALL, SRC, ALT, HEIGHT, WIDTH),
+ attrs(AttrKind.HTML5, CROSSORIGIN),
attrs(AttrKind.OBSOLETE, NAME),
attrs(AttrKind.USE_CSS, ALIGN, HSPACE, VSPACE, BORDER)),
INS(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST),
- attrs(AttrKind.OK, Attr.CITE, Attr.DATETIME)),
+ attrs(AttrKind.ALL, Attr.CITE, Attr.DATETIME)),
KBD(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
LI(BlockType.LIST_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
- attrs(AttrKind.OK, VALUE)),
+ attrs(AttrKind.ALL, VALUE),
+ attrs(AttrKind.USE_CSS, TYPE)),
LINK(BlockType.OTHER, EndKind.NONE),
+ MAIN(HtmlVersion.HTML5, BlockType.OTHER, EndKind.REQUIRED),
+
+ MARK(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
+
MENU(BlockType.BLOCK, EndKind.REQUIRED) {
@Override
public boolean accepts(HtmlTag t) {
@@ -173,13 +243,18 @@
META(BlockType.OTHER, EndKind.NONE),
- NOFRAMES(BlockType.OTHER, EndKind.REQUIRED),
+ NAV(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
+
+ NOFRAMES(HtmlVersion.HTML4, BlockType.OTHER, EndKind.REQUIRED),
NOSCRIPT(BlockType.BLOCK, EndKind.REQUIRED),
OL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
- attrs(AttrKind.OK, START, TYPE)) {
+ attrs(AttrKind.ALL, START, TYPE),
+ attrs(AttrKind.HTML5, REVERSED),
+ attrs(AttrKind.USE_CSS, COMPACT)) {
@Override
public boolean accepts(HtmlTag t) {
return (t == LI);
@@ -191,7 +266,8 @@
attrs(AttrKind.USE_CSS, ALIGN)),
PRE(BlockType.BLOCK, EndKind.REQUIRED,
- EnumSet.of(Flag.EXPECT_CONTENT)) {
+ EnumSet.of(Flag.EXPECT_CONTENT),
+ attrs(AttrKind.USE_CSS, WIDTH)) {
@Override
public boolean accepts(HtmlTag t) {
switch (t) {
@@ -214,13 +290,16 @@
SCRIPT(BlockType.OTHER, EndKind.REQUIRED),
+ SECTION(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
+
SMALL(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)),
SPAN(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)),
- STRIKE(BlockType.INLINE, EndKind.REQUIRED,
+ STRIKE(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)),
STRONG(BlockType.INLINE, EndKind.REQUIRED,
@@ -234,13 +313,14 @@
TABLE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
- attrs(AttrKind.OK, SUMMARY, Attr.FRAME, RULES, BORDER,
- CELLPADDING, CELLSPACING, WIDTH), // width OK in 4.01; not allowed in 5
+ attrs(AttrKind.ALL, BORDER),
+ attrs(AttrKind.HTML4, SUMMARY, CELLPADDING, CELLSPACING, Attr.FRAME, RULES, WIDTH),
attrs(AttrKind.USE_CSS, ALIGN, BGCOLOR)) {
@Override
public boolean accepts(HtmlTag t) {
switch (t) {
case CAPTION:
+ case COLGROUP:
case THEAD: case TBODY: case TFOOT:
case TR: // HTML 3.2
return true;
@@ -252,7 +332,8 @@
TBODY(BlockType.TABLE_ITEM, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
- attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN)) {
+ attrs(AttrKind.ALL, VALIGN),
+ attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
@Override
public boolean accepts(HtmlTag t) {
return (t == TR);
@@ -261,12 +342,16 @@
TD(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
- attrs(AttrKind.OK, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR, AXIS,
- ALIGN, CHAR, CHAROFF, VALIGN),
+ attrs(AttrKind.ALL, COLSPAN, ROWSPAN, HEADERS, VALIGN),
+ attrs(AttrKind.HTML4, AXIS, Attr.ABBR, SCOPE, ALIGN, CHAR, CHAROFF),
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
+ TEMPLATE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED,
+ EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
+
TFOOT(BlockType.TABLE_ITEM, EndKind.REQUIRED,
- attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN)) {
+ attrs(AttrKind.ALL, VALIGN),
+ attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
@Override
public boolean accepts(HtmlTag t) {
return (t == TR);
@@ -275,22 +360,27 @@
TH(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
- attrs(AttrKind.OK, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR, AXIS,
- ALIGN, CHAR, CHAROFF, VALIGN),
+ attrs(AttrKind.ALL, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR,
+ VALIGN),
+ attrs(AttrKind.HTML4, AXIS, ALIGN, CHAR, CHAROFF),
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
THEAD(BlockType.TABLE_ITEM, EndKind.REQUIRED,
- attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN)) {
+ attrs(AttrKind.ALL, VALIGN),
+ attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
@Override
public boolean accepts(HtmlTag t) {
return (t == TR);
}
},
+ TIME(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
+
TITLE(BlockType.OTHER, EndKind.REQUIRED),
TR(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
- attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN),
+ attrs(AttrKind.ALL, VALIGN),
+ attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF),
attrs(AttrKind.USE_CSS, BGCOLOR)) {
@Override
public boolean accepts(HtmlTag t) {
@@ -298,7 +388,7 @@
}
},
- TT(BlockType.INLINE, EndKind.REQUIRED,
+ TT(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
U(BlockType.INLINE, EndKind.REQUIRED,
@@ -306,13 +396,15 @@
UL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
- attrs(AttrKind.OK, COMPACT, TYPE)) { // OK in 4.01; not allowed in 5
+ attrs(AttrKind.HTML4, COMPACT, TYPE)) {
@Override
public boolean accepts(HtmlTag t) {
return (t == LI);
}
},
+ WBR(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
+
VAR(BlockType.INLINE, EndKind.REQUIRED);
/**
@@ -345,34 +437,66 @@
public static enum Attr {
ABBR,
ALIGN,
+ ALINK,
ALT,
+ ARIA_ACTIVEDESCENDANT,
+ ARIA_CONTROLS,
+ ARIA_DESCRIBEDBY,
+ ARIA_EXPANDED,
+ ARIA_LABEL,
+ ARIA_LABELLEDBY,
+ ARIA_LEVEL,
+ ARIA_MULTISELECTABLE,
+ ARIA_OWNS,
+ ARIA_POSINSET,
+ ARIA_SETSIZE,
+ ARIA_READONLY,
+ ARIA_REQUIRED,
+ ARIA_SELECTED,
+ ARIA_SORT,
AXIS,
+ BACKGROUND,
BGCOLOR,
BORDER,
CELLSPACING,
CELLPADDING,
CHAR,
CHAROFF,
+ CHARSET,
CITE,
CLEAR,
CLASS,
COLOR,
COLSPAN,
COMPACT,
+ COORDS,
+ CROSSORIGIN,
DATETIME,
FACE,
FRAME,
+ FRAMEBORDER,
HEADERS,
HEIGHT,
HREF,
HSPACE,
ID,
+ LINK,
+ LONGDESC,
+ MARGINHEIGHT,
+ MARGINWIDTH,
NAME,
+ NOSHADE,
NOWRAP,
+ PROFILE,
+ REV,
REVERSED,
+ ROLE,
ROWSPAN,
RULES,
+ SCHEME,
SCOPE,
+ SCROLLING,
+ SHAPE,
SIZE,
SPACE,
SRC,
@@ -380,14 +504,23 @@
STYLE,
SUMMARY,
TARGET,
+ TEXT,
TYPE,
VALIGN,
VALUE,
+ VERSION,
+ VLINK,
VSPACE,
WIDTH;
+ private final String name;
+
+ Attr() {
+ name = StringUtils.toLowerCase(name().replace("_", "-"));
+ }
+
public String getText() {
- return StringUtils.toLowerCase(name());
+ return name;
}
static final Map<String,Attr> index = new HashMap<>();
@@ -399,10 +532,12 @@
}
public static enum AttrKind {
+ HTML4,
+ HTML5,
INVALID,
OBSOLETE,
USE_CSS,
- OK
+ ALL
}
// This class exists to avoid warnings from using parameterized vararg type
@@ -415,25 +550,52 @@
}
+ public final HtmlVersion allowedVersion;
public final BlockType blockType;
public final EndKind endKind;
public final Set<Flag> flags;
private final Map<Attr,AttrKind> attrs;
HtmlTag(BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
- this(blockType, endKind, Collections.<Flag>emptySet(), attrMaps);
+ this(HtmlVersion.ALL, blockType, endKind, Collections.<Flag>emptySet(), attrMaps);
+ }
+
+ HtmlTag(HtmlVersion allowedVersion, BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
+ this(allowedVersion, blockType, endKind, Collections.<Flag>emptySet(), attrMaps);
}
HtmlTag(BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) {
+ this(HtmlVersion.ALL, blockType, endKind, flags, attrMaps);
+ }
+
+ HtmlTag(HtmlVersion allowedVersion, BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) {
+ this.allowedVersion = allowedVersion;
this.blockType = blockType;
this.endKind = endKind;
this.flags = flags;
this.attrs = new EnumMap<>(Attr.class);
for (Map<Attr,AttrKind> m: attrMaps)
this.attrs.putAll(m);
- attrs.put(Attr.CLASS, AttrKind.OK);
- attrs.put(Attr.ID, AttrKind.OK);
- attrs.put(Attr.STYLE, AttrKind.OK);
+ attrs.put(Attr.CLASS, AttrKind.ALL);
+ attrs.put(Attr.ID, AttrKind.ALL);
+ attrs.put(Attr.STYLE, AttrKind.ALL);
+ attrs.put(Attr.ROLE, AttrKind.HTML5);
+ // for now, assume that all ARIA attributes are allowed on all tags.
+ attrs.put(Attr.ARIA_ACTIVEDESCENDANT, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_CONTROLS, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_DESCRIBEDBY, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_EXPANDED, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_LABEL, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_LABELLEDBY, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_LEVEL, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_MULTISELECTABLE, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_OWNS, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_POSINSET, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_READONLY, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_REQUIRED, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_SELECTED, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_SETSIZE, AttrKind.HTML5);
+ attrs.put(Attr.ARIA_SORT, AttrKind.HTML5);
}
public boolean accepts(HtmlTag t) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlVersion.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.doclint;
+
+/**
+ * Enum representing HTML version of the documentation comment.
+ *
+ * @author Bhavesh Patel
+ */
+public enum HtmlVersion {
+
+ HTML4,
+ HTML5,
+ ALL;
+
+ public static HtmlVersion getHtmlVersion(String argsVersion) {
+ switch (argsVersion) {
+ case "html4":
+ return HtmlVersion.HTML4;
+ case "html5":
+ return HtmlVersion.HTML5;
+ default:
+ return null;
+ }
+ }
+}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint.properties Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint.properties Mon Apr 13 18:05:23 2015 -0700
@@ -27,9 +27,12 @@
dc.anchor.value.missing = no value given for anchor
dc.attr.lacks.value = attribute lacks value
dc.attr.not.number = attribute value is not a number
+dc.attr.not.supported.html4 = attribute not supported in HTML4: {0}
+dc.attr.not.supported.html5 = attribute not supported in HTML5: {0}
dc.attr.obsolete = attribute obsolete: {0}
dc.attr.obsolete.use.css = attribute obsolete, use CSS instead: {0}
dc.attr.repeated = repeated attribute: {0}
+dc.attr.table.border.html5 = attribute border for table only accepts "" or "1", use CSS instead: {0}
dc.attr.unknown = unknown attribute: {0}
dc.bad.option = bad option: {0}
dc.bad.value.for.option = bad value for option: {0} {1}
@@ -63,9 +66,11 @@
dc.tag.not.allowed.inline.other = block element not allowed here: {0}
dc.tag.not.closed= element not closed: {0}
dc.tag.p.in.pre= unexpected use of <p> inside <pre> element
+dc.tag.requires.heading = heading not found for </{0}>
dc.tag.self.closing = self-closing element not allowed
dc.tag.start.unmatched = end tag missing: </{0}>
dc.tag.unknown = unknown tag: {0}
+dc.tag.not.supported = tag not supported in the generated HTML version: {0}
dc.text.not.allowed = text not allowed in <{0}> element
dc.type.arg.not.allowed = type arguments not allowed here
dc.unexpected.comment=documentation comment not expected here
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -415,8 +415,10 @@
protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
String tableSummary, String[] tableHeader, Content contentTree) {
if (deprmembers.size() > 0) {
- Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
- writer.getTableCaption(configuration.getResource(headingKey)));
+ Content caption = writer.getTableCaption(configuration.getResource(headingKey));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
for (int i = 0; i < deprmembers.size(); i++) {
@@ -455,8 +457,10 @@
List<? extends ProgramElementDoc> members = mems;
boolean printedUseTableHeader = false;
if (members.size() > 0) {
- Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
- writer.getTableCaption(heading));
+ Content caption = writer.getTableCaption(heading);
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.useSummary, tableSummary, caption);
Content tbody = new HtmlTree(HtmlTag.TBODY);
Iterator<? extends ProgramElementDoc> it = members.iterator();
for (int i = 0; it.hasNext(); i++) {
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -149,13 +149,17 @@
protected void addIndexContents(Collection<PackageDoc> packages, String text,
String tableSummary, Content body) {
if (!packages.isEmpty()) {
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.indexHeader);
- addAllClassesLink(div);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
+ ? HtmlTree.NAV()
+ : new HtmlTree(HtmlTag.DIV);
+ htmlTree.addStyle(HtmlStyle.indexNav);
+ HtmlTree ul = new HtmlTree(HtmlTag.UL);
+ addAllClassesLink(ul);
if (configuration.showProfiles) {
- addAllProfilesLink(div);
+ addAllProfilesLink(ul);
}
- body.addContent(div);
+ htmlTree.addContent(ul);
+ body.addContent(htmlTree);
if (configuration.showProfiles && configuration.profilePackages.size() > 0) {
Content profileSummary = configuration.getResource("doclet.Profiles");
addProfilesList(profileSummary, body);
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileIndexWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileIndexWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015 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
@@ -194,11 +194,15 @@
protected void addIndexContents(Profiles profiles, String text,
String tableSummary, Content body) {
if (profiles.getProfileCount() > 0) {
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.indexHeader);
- addAllClassesLink(div);
- addAllPackagesLink(div);
- body.addContent(div);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
+ ? HtmlTree.NAV()
+ : new HtmlTree(HtmlTag.DIV);
+ htmlTree.addStyle(HtmlStyle.indexNav);
+ HtmlTree ul = new HtmlTree(HtmlTag.UL);
+ addAllClassesLink(ul);
+ addAllPackagesLink(ul);
+ htmlTree.addContent(ul);
+ body.addContent(htmlTree);
addProfilesList(profiles, text, tableSummary, body);
}
}
@@ -215,12 +219,16 @@
*/
protected void addProfilePackagesIndexContents(Profiles profiles, String text,
String tableSummary, Content body, String profileName) {
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.indexHeader);
- addAllClassesLink(div);
- addAllPackagesLink(div);
- addAllProfilesLink(div);
- body.addContent(div);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
+ ? HtmlTree.NAV()
+ : new HtmlTree(HtmlTag.DIV);
+ htmlTree.addStyle(HtmlStyle.indexNav);
+ HtmlTree ul = new HtmlTree(HtmlTag.UL);
+ addAllClassesLink(ul);
+ addAllPackagesLink(ul);
+ addAllProfilesLink(ul);
+ htmlTree.addContent(ul);
+ body.addContent(htmlTree);
addProfilePackagesList(profiles, text, tableSummary, body, profileName);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -53,8 +53,6 @@
*/
protected final ClassTree classtree;
- private static final String LI_CIRCLE = "circle";
-
/**
* Constructor initializes classtree variable. This constructor will be used
* while generating global tree file "overview-tree.html".
@@ -88,7 +86,7 @@
Content ul = new HtmlTree(HtmlTag.UL);
for (ClassDoc local : list) {
HtmlTree li = new HtmlTree(HtmlTag.LI);
- li.addAttr(HtmlAttr.TYPE, LI_CIRCLE);
+ li.addStyle(HtmlStyle.circle);
addPartialInfo(local, li);
addExtendsImplements(parent, local, li);
addLevelInfo(local, classtree.subs(local, isEnum),
@@ -108,14 +106,24 @@
* @param heading heading for the tree
* @param div the content tree to which the tree will be added
*/
- protected void addTree(SortedSet<ClassDoc> list, String heading, Content div) {
+ protected void addTree(SortedSet<ClassDoc> list, String heading, HtmlTree div) {
if (!list.isEmpty()) {
ClassDoc firstClassDoc = list.first();
Content headingContent = getResource(heading);
- div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
- headingContent));
+ Content sectionHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+ headingContent);
+ HtmlTree htmlTree;
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ htmlTree = HtmlTree.SECTION(sectionHeading);
+ } else {
+ div.addContent(sectionHeading);
+ htmlTree = div;
+ }
addLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
- list, list == classtree.baseEnums(), div);
+ list, list == classtree.baseEnums(), htmlTree);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ div.addContent(htmlTree);
+ }
}
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -119,8 +119,10 @@
Content ul = new HtmlTree(HtmlTag.UL);
// Generate the class links and add it to the tdFont tree.
addAllClasses(ul, wantFrames);
- Content div = HtmlTree.DIV(HtmlStyle.indexContainer, ul);
- body.addContent(div);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN(HtmlStyle.indexContainer, ul)
+ : HtmlTree.DIV(HtmlStyle.indexContainer, ul);
+ body.addContent(htmlTree);
printHtmlDocument(null, false, body);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015 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
@@ -77,6 +77,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void addAnnotationFieldDetailsMarker(Content memberDetails) {
memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
}
@@ -156,6 +163,10 @@
* {@inheritDoc}
*/
public Content getAnnotationDetails(Content annotationDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(annotationDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -72,6 +72,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void addDefaultValueInfo(MemberDoc member, Content annotationDocTree) {
if (((AnnotationTypeElementDoc) member).defaultValue() != null) {
Content dt = HtmlTree.DT(writer.getResource("doclet.Default"));
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,6 +78,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void addAnnotationDetailsMarker(Content memberDetails) {
memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_DETAILS);
}
@@ -158,6 +165,10 @@
* {@inheritDoc}
*/
public Content getAnnotationDetails(Content annotationDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(annotationDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -151,9 +151,15 @@
String pkgname = (annotationType.containingPackage() != null)?
annotationType.containingPackage().name(): "";
String clname = annotationType.name();
- Content bodyTree = getBody(true, getWindowTitle(clname));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(clname));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.header);
@@ -169,7 +175,11 @@
HtmlStyle.title, headerContent);
heading.addContent(getTypeParameterLinks(linkInfo));
div.addContent(heading);
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
@@ -185,8 +195,14 @@
*/
public void addFooter(Content contentTree) {
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
- addNavLinks(false, contentTree);
- addBottom(contentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : contentTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ contentTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -91,6 +91,11 @@
final String constructorUseTableSummary;
/**
+ * The HTML tree for main tag.
+ */
+ protected HtmlTree mainTree = HtmlTree.MAIN();
+
+ /**
* Constructor.
*
* @param filename the file to be generated.
@@ -222,7 +227,7 @@
* Generate the class use list.
*/
protected void generateClassUseFile() throws IOException {
- Content body = getClassUseHeader();
+ HtmlTree body = getClassUseHeader();
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.classUseContainer);
if (pkgSet.size() > 0) {
@@ -231,9 +236,20 @@
div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
classdoc.qualifiedName()));
}
- body.addContent(div);
- addNavLinks(false, body);
- addBottom(body);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ body.addContent(mainTree);
+ } else {
+ body.addContent(div);
+ }
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : body;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
printHtmlDocument(null, true, body);
}
@@ -259,11 +275,12 @@
* @param contentTree the content tree to which the packages list will be added
*/
protected void addPackageList(Content contentTree) throws IOException {
- Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
- getTableCaption(configuration.getResource(
+ Content caption = getTableCaption(configuration.getResource(
"doclet.ClassUse_Packages.that.use.0",
- getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc
- )))));
+ getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc))));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.useSummary, useTableSummary, caption);
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
Iterator<PackageDoc> it = pkgSet.iterator();
@@ -294,11 +311,13 @@
pkgToPackageAnnotations.isEmpty()) {
return;
}
- Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
- getTableCaption(configuration.getResource(
+ Content caption = getTableCaption(configuration.getResource(
"doclet.ClassUse_PackageAnnotation",
getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)))));
+ LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc))));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.useSummary, useTableSummary, caption);
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
@@ -333,15 +352,22 @@
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.addStyle(HtmlStyle.blockList);
for (PackageDoc pkg : pkgSet) {
- Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(getPackageAnchorName(pkg)));
+ Content markerAnchor = getMarkerAnchor(getPackageAnchorName(pkg));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(markerAnchor)
+ : HtmlTree.LI(HtmlStyle.blockList, markerAnchor);
Content link = getResource("doclet.ClassUse_Uses.of.0.in.1",
getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER,
classdoc)),
getPackageLink(pkg, utils.getPackageName(pkg)));
Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
- li.addContent(heading);
- addClassUse(pkg, li);
- ul.addContent(li);
+ htmlTree.addContent(heading);
+ addClassUse(pkg, htmlTree);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
contentTree.addContent(li);
@@ -443,15 +469,21 @@
*
* @return a content tree representing the class use header
*/
- protected Content getClassUseHeader() {
+ protected HtmlTree getClassUseHeader() {
String cltype = configuration.getText(classdoc.isInterface()?
"doclet.Interface":"doclet.Class");
String clname = classdoc.qualifiedName();
String title = configuration.getText("doclet.Window_ClassUse_Header",
cltype, clname);
- Content bodyTree = getBody(true, getWindowTitle(title));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
ContentBuilder headContent = new ContentBuilder();
headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
headContent.addContent(new HtmlTree(HtmlTag.BR));
@@ -459,7 +491,11 @@
Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
true, HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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,6 +35,7 @@
import com.sun.tools.doclets.internal.toolkit.builders.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
+
import java.io.IOException;
/**
@@ -160,9 +161,15 @@
String pkgname = (classDoc.containingPackage() != null)?
classDoc.containingPackage().name(): "";
String clname = classDoc.name();
- Content bodyTree = getBody(true, getWindowTitle(clname));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(clname));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.header);
@@ -194,7 +201,11 @@
HtmlStyle.title, headerContent);
heading.addContent(getTypeParameterLinks(linkInfo));
div.addContent(heading);
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
@@ -210,8 +221,14 @@
*/
public void addFooter(Content contentTree) {
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
- addNavLinks(false, contentTree);
- addBottom(contentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : contentTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ contentTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -31,7 +31,7 @@
import javax.tools.JavaFileManager;
import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
+import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclint.DocLint;
@@ -176,6 +176,11 @@
public boolean createoverview = false;
/**
+ * This is the HTML version of the generated pages. HTML 4.01 is the default output version.
+ */
+ public HtmlVersion htmlVersion = HtmlVersion.HTML4;
+
+ /**
* Collected set of doclint options
*/
public Set<String> doclintOpts = new LinkedHashSet<>();
@@ -279,6 +284,10 @@
nooverview = true;
} else if (opt.equals("-overview")) {
overview = true;
+ } else if (opt.equals("-html4")) {
+ htmlVersion = HtmlVersion.HTML4;
+ } else if (opt.equals("-html5")) {
+ htmlVersion = HtmlVersion.HTML5;
} else if (opt.equals("-xdoclint")) {
doclintOpts.add(null);
} else if (opt.startsWith("-xdoclint:")) {
@@ -300,7 +309,8 @@
setTopFile(root);
if (root instanceof RootDocImpl) {
- ((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames());
+ ((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames(),
+ StringUtils.toLowerCase(htmlVersion.name()));
}
}
@@ -336,6 +346,8 @@
option.equals("-use") ||
option.equals("-nonavbar") ||
option.equals("-nooverview") ||
+ option.equals("-html4") ||
+ option.equals("-html5") ||
option.equals("-xdoclint") ||
option.startsWith("-xdoclint:")) {
return 1;
@@ -471,6 +483,20 @@
}
/**
+ * Return true if the generated output is HTML5.
+ */
+ public boolean isOutputHtml5() {
+ return htmlVersion == HtmlVersion.HTML5;
+ }
+
+ /**
+ * Return true if the tag is allowed for this specific version of HTML.
+ */
+ public boolean allowTag(HtmlTag htmlTag) {
+ return htmlTag.allowTag(this.htmlVersion);
+ }
+
+ /**
* {@inheritDoc}
*/
@Override
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -63,6 +63,16 @@
private final String[] constantsTableHeader;
/**
+ * The HTML tree for main tag.
+ */
+ private HtmlTree mainTree = HtmlTree.MAIN();
+
+ /**
+ * The HTML tree for constant values summary.
+ */
+ private HtmlTree summaryTree;
+
+ /**
* Construct a ConstantsSummaryWriter.
* @param configuration the configuration used in this run
* of the standard doclet.
@@ -85,9 +95,15 @@
*/
public Content getHeader() {
String label = configuration.getText("doclet.Constants_Summary");
- Content bodyTree = getBody(true, getWindowTitle(label));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(label));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
return bodyTree;
}
@@ -123,7 +139,7 @@
/**
* {@inheritDoc}
*/
- public Content getContentsList(Content contentListTree) {
+ public void addContentsList(Content contentTree, Content contentListTree) {
Content titleContent = getResource(
"doclet.Constants_Summary");
Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
@@ -131,10 +147,18 @@
Content div = HtmlTree.DIV(HtmlStyle.header, pHeading);
Content headingContent = getResource(
"doclet.Contents");
- div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
- headingContent));
- div.addContent(contentListTree);
- return div;
+ Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+ headingContent);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree section = HtmlTree.SECTION(heading);
+ section.addContent(contentListTree);
+ div.addContent(section);
+ mainTree.addContent(div);
+ } else {
+ div.addContent(heading);
+ div.addContent(contentListTree);
+ contentTree.addContent(div);
+ }
}
/**
@@ -149,9 +173,11 @@
/**
* {@inheritDoc}
*/
- public void addPackageName(PackageDoc pkg, String parsedPackageName,
- Content summariesTree) {
+ public void addPackageName(String parsedPackageName, Content summariesTree, boolean first) {
Content pkgNameContent;
+ if (!first && configuration.allowTag(HtmlTag.SECTION)) {
+ summariesTree.addContent(summaryTree);
+ }
if (parsedPackageName.length() == 0) {
summariesTree.addContent(getMarkerAnchor(
SectionName.UNNAMED_PACKAGE_ANCHOR));
@@ -165,7 +191,11 @@
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
pkgNameContent);
heading.addContent(headingContent);
- summariesTree.addContent(heading);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ summaryTree = HtmlTree.SECTION(heading);
+ } else {
+ summariesTree.addContent(heading);
+ }
}
/**
@@ -178,6 +208,17 @@
}
/**
+ * {@inheritDoc}
+ */
+ public void addClassConstant(Content summariesTree, Content classConstantTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ summaryTree.addContent(classConstantTree);
+ } else {
+ summariesTree.addContent(classConstantTree);
+ }
+ }
+
+ /**
* Get the table caption and header for the constant summary table
*
* @param cd classdoc to be documented
@@ -208,8 +249,10 @@
* @return the table caption and header
*/
protected Content getClassName(Content classStr) {
- Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
- getTableCaption(classStr));
+ Content caption = getTableCaption(classStr);
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.constantsSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.constantsSummary, constantsTableSummary, caption);
table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
return table;
}
@@ -300,9 +343,30 @@
/**
* {@inheritDoc}
*/
+ public void addConstantSummaries(Content contentTree, Content summariesTree) {
+ if (configuration.allowTag(HtmlTag.SECTION) && summaryTree != null) {
+ summariesTree.addContent(summaryTree);
+ }
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(summariesTree);
+ contentTree.addContent(mainTree);
+ } else {
+ contentTree.addContent(summariesTree);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void addFooter(Content contentTree) {
- addNavLinks(false, contentTree);
- addBottom(contentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : contentTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ contentTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -92,6 +92,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public Content getConstructorDetailsTreeHeader(ClassDoc classDoc,
Content memberDetailsTree) {
memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
@@ -177,6 +184,10 @@
* {@inheritDoc}
*/
public Content getConstructorDetails(Content constructorDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(constructorDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(constructorDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -138,8 +138,11 @@
*/
protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi)
throws IOException {
- Content body = getHeader();
- body.addContent(getContentsList(deprapi));
+ HtmlTree body = getHeader();
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN()
+ : body;
+ htmlTree.addContent(getContentsList(deprapi));
String memberTableSummary;
String[] memberTableHeader = new String[1];
HtmlTree div = new HtmlTree(HtmlTag.DIV);
@@ -164,9 +167,20 @@
HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
}
}
- body.addContent(div);
- addNavLinks(false, body);
- addBottom(body);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ htmlTree.addContent(div);
+ body.addContent(htmlTree);
+ } else {
+ body.addContent(div);
+ }
+ htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : body;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
printHtmlDocument(null, true, body);
}
@@ -226,11 +240,17 @@
*
* @return a content tree for the header
*/
- public Content getHeader() {
+ public HtmlTree getHeader() {
String title = configuration.getText("doclet.Window_Deprecated_List");
- Content bodyTree = getBody(true, getWindowTitle(title));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
return bodyTree;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,6 +69,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public Content getEnumConstantsDetailsTreeHeader(ClassDoc classDoc,
Content memberDetailsTree) {
memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS);
@@ -140,6 +147,10 @@
* {@inheritDoc}
*/
public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(enumConstantsDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(enumConstantsDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -70,6 +70,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public Content getFieldDetailsTreeHeader(ClassDoc classDoc,
Content memberDetailsTree) {
memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS);
@@ -161,6 +168,10 @@
* {@inheritDoc}
*/
public Content getFieldDetails(Content fieldDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(fieldDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(fieldDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -96,7 +96,12 @@
protected void generateFrameFile() throws IOException {
Content frame = getFrameDetails();
HtmlTree body = new HtmlTree(HtmlTag.BODY);
- body.addContent(frame);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ HtmlTree main = HtmlTree.MAIN(frame);
+ body.addContent(main);
+ } else {
+ body.addContent(frame);
+ }
if (configuration.windowtitle.length() > 0) {
printFramesDocument(configuration.windowtitle, configuration,
body);
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -44,6 +44,8 @@
*/
public class HelpWriter extends HtmlDocletWriter {
+ HtmlTree mainTree = HtmlTree.MAIN();
+
/**
* Constructor to construct HelpWriter object.
* @param filename File to be generated.
@@ -81,12 +83,24 @@
*/
protected void generateHelpFile() throws IOException {
String title = configuration.getText("doclet.Window_Help_title");
- Content body = getBody(true, getWindowTitle(title));
- addTop(body);
- addNavLinks(true, body);
+ HtmlTree body = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : body;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ body.addContent(htmlTree);
+ }
addHelpFileContents(body);
- addNavLinks(false, body);
- addBottom(body);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ htmlTree = HtmlTree.FOOTER();
+ }
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
printHtmlDocument(null, true, body);
}
@@ -105,26 +119,39 @@
Content line2 = HtmlTree.DIV(HtmlStyle.subTitle,
getResource("doclet.Help_line_2"));
div.addContent(line2);
- contentTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ contentTree.addContent(div);
+ }
+ HtmlTree htmlTree;
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.addStyle(HtmlStyle.blockList);
if (configuration.createoverview) {
Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Overview"));
- Content liOverview = HtmlTree.LI(HtmlStyle.blockList, overviewHeading);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(overviewHeading)
+ : HtmlTree.LI(HtmlStyle.blockList, overviewHeading);
Content line3 = getResource("doclet.Help_line_3",
getHyperLink(DocPaths.OVERVIEW_SUMMARY,
configuration.getText("doclet.Overview")));
Content overviewPara = HtmlTree.P(line3);
- liOverview.addContent(overviewPara);
- ul.addContent(liOverview);
+ htmlTree.addContent(overviewPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Package"));
- Content liPackage = HtmlTree.LI(HtmlStyle.blockList, packageHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(packageHead)
+ : HtmlTree.LI(HtmlStyle.blockList, packageHead);
Content line4 = getResource("doclet.Help_line_4");
Content packagePara = HtmlTree.P(line4);
- liPackage.addContent(packagePara);
+ htmlTree.addContent(packagePara);
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
ulPackage.addContent(HtmlTree.LI(
getResource("doclet.Interfaces_Italic")));
@@ -138,14 +165,20 @@
getResource("doclet.Errors")));
ulPackage.addContent(HtmlTree.LI(
getResource("doclet.AnnotationTypes")));
- liPackage.addContent(ulPackage);
- ul.addContent(liPackage);
+ htmlTree.addContent(ulPackage);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Help_line_5"));
- Content liClass = HtmlTree.LI(HtmlStyle.blockList, classHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(classHead)
+ : HtmlTree.LI(HtmlStyle.blockList, classHead);
Content line6 = getResource("doclet.Help_line_6");
Content classPara = HtmlTree.P(line6);
- liClass.addContent(classPara);
+ htmlTree.addContent(classPara);
HtmlTree ul1 = new HtmlTree(HtmlTag.UL);
ul1.addContent(HtmlTree.LI(
getResource("doclet.Help_line_7")));
@@ -159,7 +192,7 @@
getResource("doclet.Help_line_11")));
ul1.addContent(HtmlTree.LI(
getResource("doclet.Help_line_12")));
- liClass.addContent(ul1);
+ htmlTree.addContent(ul1);
HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
ul2.addContent(HtmlTree.LI(
getResource("doclet.Nested_Class_Summary")));
@@ -169,7 +202,7 @@
getResource("doclet.Constructor_Summary")));
ul2.addContent(HtmlTree.LI(
getResource("doclet.Method_Summary")));
- liClass.addContent(ul2);
+ htmlTree.addContent(ul2);
HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
ul3.addContent(HtmlTree.LI(
getResource("doclet.Field_Detail")));
@@ -177,18 +210,24 @@
getResource("doclet.Constructor_Detail")));
ul3.addContent(HtmlTree.LI(
getResource("doclet.Method_Detail")));
- liClass.addContent(ul3);
+ htmlTree.addContent(ul3);
Content line13 = getResource("doclet.Help_line_13");
Content para = HtmlTree.P(line13);
- liClass.addContent(para);
- ul.addContent(liClass);
+ htmlTree.addContent(para);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
//Annotation Types
Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.AnnotationType"));
- Content liAnnotation = HtmlTree.LI(HtmlStyle.blockList, aHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(aHead)
+ : HtmlTree.LI(HtmlStyle.blockList, aHead);
Content aline1 = getResource("doclet.Help_annotation_type_line_1");
Content aPara = HtmlTree.P(aline1);
- liAnnotation.addContent(aPara);
+ htmlTree.addContent(aPara);
HtmlTree aul = new HtmlTree(HtmlTag.UL);
aul.addContent(HtmlTree.LI(
getResource("doclet.Help_annotation_type_line_2")));
@@ -200,15 +239,21 @@
getResource("doclet.Annotation_Type_Optional_Member_Summary")));
aul.addContent(HtmlTree.LI(
getResource("doclet.Annotation_Type_Member_Detail")));
- liAnnotation.addContent(aul);
- ul.addContent(liAnnotation);
+ htmlTree.addContent(aul);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
//Enums
Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Enum"));
- Content liEnum = HtmlTree.LI(HtmlStyle.blockList, enumHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(enumHead)
+ : HtmlTree.LI(HtmlStyle.blockList, enumHead);
Content eline1 = getResource("doclet.Help_enum_line_1");
Content enumPara = HtmlTree.P(eline1);
- liEnum.addContent(enumPara);
+ htmlTree.addContent(enumPara);
HtmlTree eul = new HtmlTree(HtmlTag.UL);
eul.addContent(HtmlTree.LI(
getResource("doclet.Help_enum_line_2")));
@@ -218,46 +263,68 @@
getResource("doclet.Enum_Constant_Summary")));
eul.addContent(HtmlTree.LI(
getResource("doclet.Enum_Constant_Detail")));
- liEnum.addContent(eul);
- ul.addContent(liEnum);
+ htmlTree.addContent(eul);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
if (configuration.classuse) {
Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Help_line_14"));
- Content liUse = HtmlTree.LI(HtmlStyle.blockList, useHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(useHead)
+ : HtmlTree.LI(HtmlStyle.blockList, useHead);
Content line15 = getResource("doclet.Help_line_15");
Content usePara = HtmlTree.P(line15);
- liUse.addContent(usePara);
- ul.addContent(liUse);
+ htmlTree.addContent(usePara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
if (configuration.createtree) {
Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Help_line_16"));
- Content liTree = HtmlTree.LI(HtmlStyle.blockList, treeHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(treeHead)
+ : HtmlTree.LI(HtmlStyle.blockList, treeHead);
Content line17 = getResource("doclet.Help_line_17_with_tree_link",
getHyperLink(DocPaths.OVERVIEW_TREE,
configuration.getText("doclet.Class_Hierarchy")),
HtmlTree.CODE(new StringContent("java.lang.Object")));
Content treePara = HtmlTree.P(line17);
- liTree.addContent(treePara);
+ htmlTree.addContent(treePara);
HtmlTree tul = new HtmlTree(HtmlTag.UL);
tul.addContent(HtmlTree.LI(
getResource("doclet.Help_line_18")));
tul.addContent(HtmlTree.LI(
getResource("doclet.Help_line_19")));
- liTree.addContent(tul);
- ul.addContent(liTree);
+ htmlTree.addContent(tul);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
if (!(configuration.nodeprecatedlist ||
configuration.nodeprecated)) {
Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Deprecated_API"));
- Content liDeprecated = HtmlTree.LI(HtmlStyle.blockList, dHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(dHead)
+ : HtmlTree.LI(HtmlStyle.blockList, dHead);
Content line20 = getResource("doclet.Help_line_20_with_deprecated_api_link",
getHyperLink(DocPaths.DEPRECATED_LIST,
configuration.getText("doclet.Deprecated_API")));
Content dPara = HtmlTree.P(line20);
- liDeprecated.addContent(dPara);
- ul.addContent(liDeprecated);
+ htmlTree.addContent(dPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
if (configuration.createindex) {
Content indexlink;
@@ -270,55 +337,96 @@
}
Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Help_line_21"));
- Content liIndex = HtmlTree.LI(HtmlStyle.blockList, indexHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(indexHead)
+ : HtmlTree.LI(HtmlStyle.blockList, indexHead);
Content line22 = getResource("doclet.Help_line_22", indexlink);
Content indexPara = HtmlTree.P(line22);
- liIndex.addContent(indexPara);
- ul.addContent(liIndex);
+ htmlTree.addContent(indexPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Help_line_23"));
- Content liPrev = HtmlTree.LI(HtmlStyle.blockList, prevHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(prevHead)
+ : HtmlTree.LI(HtmlStyle.blockList, prevHead);
Content line24 = getResource("doclet.Help_line_24");
Content prevPara = HtmlTree.P(line24);
- liPrev.addContent(prevPara);
- ul.addContent(liPrev);
+ htmlTree.addContent(prevPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Help_line_25"));
- Content liFrame = HtmlTree.LI(HtmlStyle.blockList, frameHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(frameHead)
+ : HtmlTree.LI(HtmlStyle.blockList, frameHead);
Content line26 = getResource("doclet.Help_line_26");
Content framePara = HtmlTree.P(line26);
- liFrame.addContent(framePara);
- ul.addContent(liFrame);
+ htmlTree.addContent(framePara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
Content allclassesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.All_Classes"));
- Content liAllClasses = HtmlTree.LI(HtmlStyle.blockList, allclassesHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(allclassesHead)
+ : HtmlTree.LI(HtmlStyle.blockList, allclassesHead);
Content line27 = getResource("doclet.Help_line_27",
getHyperLink(DocPaths.ALLCLASSES_NOFRAME,
configuration.getText("doclet.All_Classes")));
Content allclassesPara = HtmlTree.P(line27);
- liAllClasses.addContent(allclassesPara);
- ul.addContent(liAllClasses);
+ htmlTree.addContent(allclassesPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Serialized_Form"));
- Content liSerial = HtmlTree.LI(HtmlStyle.blockList, sHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(sHead)
+ : HtmlTree.LI(HtmlStyle.blockList, sHead);
Content line28 = getResource("doclet.Help_line_28");
Content serialPara = HtmlTree.P(line28);
- liSerial.addContent(serialPara);
- ul.addContent(liSerial);
+ htmlTree.addContent(serialPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
getResource("doclet.Constants_Summary"));
- Content liConst = HtmlTree.LI(HtmlStyle.blockList, constHead);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(constHead)
+ : HtmlTree.LI(HtmlStyle.blockList, constHead);
Content line29 = getResource("doclet.Help_line_29",
getHyperLink(DocPaths.CONSTANT_VALUES,
configuration.getText("doclet.Constants_Summary")));
Content constPara = HtmlTree.P(line29);
- liConst.addContent(constPara);
- ul.addContent(liConst);
+ htmlTree.addContent(constPara);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, getResource("doclet.Help_line_30"));
divContent.addContent(line30);
- contentTree.addContent(divContent);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(divContent);
+ contentTree.addContent(mainTree);
+ } else {
+ contentTree.addContent(divContent);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -183,8 +183,7 @@
* @return a content tree for the script
*/
public Content getAllClassesLinkScript(String id) {
- HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
- script.addAttr(HtmlAttr.TYPE, "text/javascript");
+ HtmlTree script = HtmlTree.SCRIPT();
String scriptCode = "<!--" + DocletConstants.NL +
" allClassesLink = document.getElementById(\"" + id + "\");" + DocletConstants.NL +
" if(window==top) {" + DocletConstants.NL +
@@ -197,6 +196,9 @@
Content scriptContent = new RawHtml(scriptCode);
script.addContent(scriptContent);
Content div = HtmlTree.DIV(script);
+ Content div_noscript = HtmlTree.DIV(getResource("doclet.No_Script_Message"));
+ Content noScript = HtmlTree.NOSCRIPT(div_noscript);
+ div.addContent(noScript);
return div;
}
@@ -342,8 +344,9 @@
if(classes.length > 0) {
Arrays.sort(classes);
Content caption = getTableCaption(new RawHtml(label));
- Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
- tableSummary, caption);
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.typeSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.typeSummary, tableSummary, caption);
table.addContent(getSummaryTableHeader(tableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
for (int i = 0; i < classes.length; i++) {
@@ -393,7 +396,9 @@
*/
public void printHtmlDocument(String[] metakeywords, boolean includeScript,
Content body) throws IOException {
- Content htmlDocType = DocType.TRANSITIONAL;
+ Content htmlDocType = configuration.isOutputHtml5()
+ ? DocType.HTML5
+ : DocType.TRANSITIONAL;
Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
Content head = new HtmlTree(HtmlTag.HEAD);
head.addContent(getGeneratedBy(!configuration.notimestamp));
@@ -404,7 +409,9 @@
head.addContent(meta);
if (!configuration.notimestamp) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
- meta = HtmlTree.META("date", dateFormat.format(new Date()));
+ meta = HtmlTree.META(configuration.isOutputHtml5()
+ ? "dc.created"
+ : "date", dateFormat.format(new Date()));
head.addContent(meta);
}
if (metakeywords != null) {
@@ -459,38 +466,41 @@
/**
* Adds the user specified top.
*
- * @param body the content tree to which user specified top will be added
+ * @param htmlTree the content tree to which user specified top will be added
*/
- public void addTop(Content body) {
+ public void addTop(Content htmlTree) {
Content top = new RawHtml(replaceDocRootDir(configuration.top));
- body.addContent(top);
+ htmlTree.addContent(top);
}
/**
* Adds the user specified bottom.
*
- * @param body the content tree to which user specified bottom will be added
+ * @param htmlTree the content tree to which user specified bottom will be added
*/
- public void addBottom(Content body) {
+ public void addBottom(Content htmlTree) {
Content bottom = new RawHtml(replaceDocRootDir(configuration.bottom));
Content small = HtmlTree.SMALL(bottom);
Content p = HtmlTree.P(HtmlStyle.legalCopy, small);
- body.addContent(p);
+ htmlTree.addContent(p);
}
/**
* Adds the navigation bar for the Html page at the top and and the bottom.
*
* @param header If true print navigation bar at the top of the page else
- * @param body the HtmlTree to which the nav links will be added
+ * @param htmlTree the HtmlTree to which the nav links will be added
*/
- protected void addNavLinks(boolean header, Content body) {
+ protected void addNavLinks(boolean header, Content htmlTree) {
if (!configuration.nonavbar) {
+ Content tree = (configuration.allowTag(HtmlTag.NAV))
+ ? HtmlTree.NAV()
+ : htmlTree;
String allClassesId = "allclasses_";
HtmlTree navDiv = new HtmlTree(HtmlTag.DIV);
Content skipNavLinks = configuration.getResource("doclet.Skip_navigation_links");
if (header) {
- body.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
+ tree.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
navDiv.addStyle(HtmlStyle.topNav);
allClassesId += "navbar_top";
Content a = getMarkerAnchor(SectionName.NAVBAR_TOP);
@@ -501,7 +511,7 @@
skipNavLinks.toString(), ""));
navDiv.addContent(skipLinkContent);
} else {
- body.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
+ tree.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
navDiv.addStyle(HtmlStyle.bottomNav);
allClassesId += "navbar_bottom";
Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM);
@@ -548,7 +558,7 @@
navDiv.addContent(navList);
Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, getUserHeaderFooter(header));
navDiv.addContent(aboutDiv);
- body.addContent(navDiv);
+ tree.addContent(navDiv);
Content ulNav = HtmlTree.UL(HtmlStyle.navList, getNavLinkPrevious());
ulNav.addContent(getNavLinkNext());
Content subDiv = HtmlTree.DIV(HtmlStyle.subNav, ulNav);
@@ -562,12 +572,15 @@
addSummaryDetailLinks(subDiv);
if (header) {
subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
- body.addContent(subDiv);
- body.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
+ tree.addContent(subDiv);
+ tree.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
} else {
subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM));
- body.addContent(subDiv);
- body.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
+ tree.addContent(subDiv);
+ tree.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
+ }
+ if (configuration.allowTag(HtmlTag.NAV)) {
+ htmlTree.addContent(tree);
}
}
}
@@ -904,7 +917,7 @@
public Content getMarkerAnchor(String anchorName, Content anchorContent) {
if (anchorContent == null)
anchorContent = new Comment(" ");
- Content markerAnchor = HtmlTree.A_NAME(anchorName, anchorContent);
+ Content markerAnchor = HtmlTree.A_ID(anchorName, anchorContent);
return markerAnchor;
}
@@ -942,8 +955,10 @@
protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
String tableSummary, String[] tableHeader, Content contentTree) {
if (deprPkgs.size() > 0) {
- Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
- getTableCaption(configuration.getResource(headingKey)));
+ Content caption = getTableCaption(configuration.getResource(headingKey));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
table.addContent(getSummaryTableHeader(tableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
for (int i = 0; i < deprPkgs.size(); i++) {
@@ -1829,8 +1844,7 @@
* @return an HtmlTree for the Script tag which provides the JavaScript location
*/
public HtmlTree getScriptProperties() {
- HtmlTree script = HtmlTree.SCRIPT("text/javascript",
- pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
+ HtmlTree script = HtmlTree.SCRIPT(pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
return script;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -150,7 +150,7 @@
writer.getTagletWriterInstance(false), tagContent);
Content dlTags = new HtmlTree(HtmlTag.DL);
dlTags.addContent(tagContent);
- methodsContentTree.addContent(dlTags); // TODO: what if empty?
+ methodsContentTree.addContent(dlTags);
MethodDoc method = member;
if (method.name().compareTo("writeExternal") == 0
&& method.tags("serialData").length == 0) {
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -82,6 +82,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public Content getMethodDetailsTreeHeader(ClassDoc classDoc,
Content memberDetailsTree) {
memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS);
@@ -182,6 +189,10 @@
* {@inheritDoc}
*/
public Content getMethodDetails(Content methodDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(methodDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(methodDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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,6 +69,13 @@
}
/**
+ * {@inheritDoc}
+ */
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
* Close the writer.
*/
public void close() throws IOException {
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -93,15 +93,21 @@
try {
packgen = new PackageFrameWriter(configuration, packageDoc);
String pkgName = configuration.utils.getPackageName(packageDoc);
- Content body = packgen.getBody(false, packgen.getWindowTitle(pkgName));
+ HtmlTree body = packgen.getBody(false, packgen.getWindowTitle(pkgName));
Content pkgNameContent = new StringContent(pkgName);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN()
+ : body;
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
packgen.getTargetPackageLink(packageDoc, "classFrame", pkgNameContent));
- body.addContent(heading);
+ htmlTree.addContent(heading);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.indexContainer);
packgen.addClassListing(div);
- body.addContent(div);
+ htmlTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ body.addContent(htmlTree);
+ }
packgen.printHtmlDocument(
configuration.metakeywords.getMetaKeywords(packageDoc), false, body);
packgen.close();
@@ -120,7 +126,7 @@
*
* @param contentTree the content tree to which the listing will be added
*/
- protected void addClassListing(Content contentTree) {
+ protected void addClassListing(HtmlTree contentTree) {
Configuration config = configuration;
if (packageDoc.isIncluded()) {
addClassKindListing(packageDoc.interfaces(),
@@ -160,11 +166,14 @@
* @param contentTree the content tree to which the class kind listing will be added
*/
protected void addClassKindListing(ClassDoc[] arr, Content labelContent,
- Content contentTree) {
+ HtmlTree contentTree) {
arr = utils.filterOutPrivateClasses(arr, configuration.javafx);
if(arr.length > 0) {
Arrays.sort(arr);
boolean printedHeader = false;
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION()
+ : contentTree;
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(labelContent);
for (ClassDoc classDoc : arr) {
@@ -177,7 +186,7 @@
if (!printedHeader) {
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
true, labelContent);
- contentTree.addContent(heading);
+ htmlTree.addContent(heading);
printedHeader = true;
}
Content arr_i_name = new StringContent(classDoc.name());
@@ -188,7 +197,10 @@
Content li = HtmlTree.LI(link);
ul.addContent(li);
}
- contentTree.addContent(ul);
+ htmlTree.addContent(ul);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ contentTree.addContent(htmlTree);
+ }
}
}
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -83,7 +83,9 @@
String tableSummary, Content body) {
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
packagesLabel);
- Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
+ : HtmlTree.DIV(HtmlStyle.indexContainer, heading);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(packagesLabel);
for (PackageDoc aPackage : packages) {
@@ -94,8 +96,8 @@
ul.addContent(getPackage(aPackage));
}
}
- div.addContent(ul);
- body.addContent(div);
+ htmlTree.addContent(ul);
+ body.addContent(htmlTree);
}
/**
@@ -146,26 +148,26 @@
* Adds "All Classes" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all classes link should be added
+ * @param ul the Content object to which the "All Classes" link should be added
*/
- protected void addAllClassesLink(Content div) {
+ protected void addAllClassesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
allclassesLabel, "", "packageFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
* Adds "All Profiles" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all profiles link should be added
+ * @param ul the Content object to which the "All Profiles" link should be added
*/
- protected void addAllProfilesLink(Content div) {
+ protected void addAllProfilesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
allprofilesLabel, "", "packageListFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -67,6 +67,11 @@
private List<String> groupList;
/**
+ * HTML tree for main tag.
+ */
+ private HtmlTree htmlTree = HtmlTree.MAIN();
+
+ /**
* Construct the PackageIndexWriter. Also constructs the grouping
* information as provided on the command line by "-group" option. Stores
* the order of groups specified by the user.
@@ -140,7 +145,11 @@
}
profilesDiv.addContent(ul);
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv);
- body.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ htmlTree.addContent(div);
+ } else {
+ body.addContent(div);
+ }
}
/**
@@ -148,14 +157,19 @@
*/
protected void addPackagesList(Collection<PackageDoc> packages, String text,
String tableSummary, Content body) {
- Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary,
- getTableCaption(new RawHtml(text)));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.overviewSummary, getTableCaption(new RawHtml(text)))
+ : HtmlTree.TABLE(HtmlStyle.overviewSummary, tableSummary, getTableCaption(new RawHtml(text)));
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
addPackagesList(packages, tbody);
table.addContent(tbody);
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table);
- body.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ htmlTree.addContent(div);
+ } else {
+ body.addContent(div);
+ }
}
/**
@@ -192,6 +206,7 @@
* @param body the documentation tree to which the overview header will be added
*/
protected void addOverviewHeader(Content body) {
+ addConfigurationTitle(body);
if (root.inlineTags().length > 0) {
HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV);
subTitleDiv.addStyle(HtmlStyle.subTitle);
@@ -205,7 +220,11 @@
descriptionLabel, "", "");
descPara.addContent(descLink);
div.addContent(descPara);
- body.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ htmlTree.addContent(div);
+ } else {
+ body.addContent(div);
+ }
}
}
@@ -235,7 +254,12 @@
div.addStyle(HtmlStyle.contentContainer);
addOverviewComment(div);
addTagsInfo(root, div);
- body.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ htmlTree.addContent(div);
+ body.addContent(htmlTree);
+ } else {
+ body.addContent(div);
+ }
}
/**
@@ -246,9 +270,14 @@
* @body the documentation tree to which the navigation bar header will be added
*/
protected void addNavigationBarHeader(Content body) {
- addTop(body);
- addNavLinks(true, body);
- addConfigurationTitle(body);
+ Content htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : body;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ body.addContent(htmlTree);
+ }
}
/**
@@ -258,7 +287,13 @@
* @param body the documentation tree to which the navigation bar footer will be added
*/
protected void addNavigationBarFooter(Content body) {
- addNavLinks(false, body);
- addBottom(body);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : body;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
}
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -113,7 +113,10 @@
* Generate a separate tree file for each package.
*/
protected void generatePackageTreeFile() throws IOException {
- Content body = getPackageTreeHeader();
+ HtmlTree body = getPackageTreeHeader();
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN()
+ : body;
Content headContent = getResource("doclet.Hierarchy_For_Package",
utils.getPackageName(packagedoc));
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
@@ -122,16 +125,25 @@
if (configuration.packages.size() > 1) {
addLinkToMainTree(div);
}
- body.addContent(div);
+ htmlTree.addContent(div);
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.addStyle(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);
- body.addContent(divTree);
- addNavLinks(false, body);
- addBottom(body);
+ htmlTree.addContent(divTree);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ body.addContent(htmlTree);
+ }
+ HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : body;
+ addNavLinks(false, tree);
+ addBottom(tree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(tree);
+ }
printHtmlDocument(null, true, body);
}
@@ -140,12 +152,18 @@
*
* @return a content tree for the header
*/
- protected Content getPackageTreeHeader() {
+ protected HtmlTree getPackageTreeHeader() {
String title = packagedoc.name() + " " +
configuration.getText("doclet.Window_Class_Hierarchy");
- Content bodyTree = getBody(true, getWindowTitle(title));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
return bodyTree;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -48,6 +48,7 @@
final PackageDoc pkgdoc;
final SortedMap<String,Set<ClassDoc>> usingPackageToUsedClasses = new TreeMap<>();
+ protected HtmlTree mainTree = HtmlTree.MAIN();
/**
* Constructor.
@@ -112,7 +113,7 @@
* Generate the package use list.
*/
protected void generatePackageUseFile() throws IOException {
- Content body = getPackageUseHeader();
+ HtmlTree body = getPackageUseHeader();
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.contentContainer);
if (usingPackageToUsedClasses.isEmpty()) {
@@ -121,9 +122,20 @@
} else {
addPackageUse(div);
}
- body.addContent(div);
- addNavLinks(false, body);
- addBottom(body);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ body.addContent(mainTree);
+ } else {
+ body.addContent(div);
+ }
+ HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : body;
+ addNavLinks(false, tree);
+ addBottom(tree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(tree);
+ }
printHtmlDocument(null, true, body);
}
@@ -148,10 +160,12 @@
* @param contentTree the content tree to which the package list will be added
*/
protected void addPackageList(Content contentTree) throws IOException {
- Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
- getTableCaption(configuration.getResource(
+ Content caption = getTableCaption(configuration.getResource(
"doclet.ClassUse_Packages.that.use.0",
- getPackageLink(pkgdoc, utils.getPackageName(pkgdoc)))));
+ getPackageLink(pkgdoc, utils.getPackageName(pkgdoc))));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.useSummary, useTableSummary, caption);
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
@@ -191,11 +205,13 @@
}
String tableSummary = configuration.getText("doclet.Use_Table_Summary",
configuration.getText("doclet.classes"));
- Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
- getTableCaption(configuration.getResource(
- "doclet.ClassUse_Classes.in.0.used.by.1",
- getPackageLink(pkgdoc, utils.getPackageName(pkgdoc)),
- getPackageLink(usingPackage, utils.getPackageName(usingPackage)))));
+ Content caption = getTableCaption(configuration.getResource(
+ "doclet.ClassUse_Classes.in.0.used.by.1",
+ getPackageLink(pkgdoc, utils.getPackageName(pkgdoc)),
+ getPackageLink(usingPackage, utils.getPackageName(usingPackage))));
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.useSummary, tableSummary, caption);
table.addContent(getSummaryTableHeader(classTableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
Iterator<ClassDoc> itc =
@@ -259,14 +275,20 @@
*
* @return a content tree representing the package use header
*/
- protected Content getPackageUseHeader() {
+ protected HtmlTree getPackageUseHeader() {
String packageText = configuration.getText("doclet.Package");
String name = pkgdoc.name();
String title = configuration.getText("doclet.Window_ClassUse_Header",
packageText, name);
- Content bodyTree = getBody(true, getWindowTitle(title));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
ContentBuilder headContent = new ContentBuilder();
headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
headContent.addContent(new HtmlTree(HtmlTag.BR));
@@ -274,7 +296,11 @@
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -65,6 +65,16 @@
protected PackageDoc packageDoc;
/**
+ * The HTML tree for main tag.
+ */
+ protected HtmlTree mainTree = HtmlTree.MAIN();
+
+ /**
+ * The HTML tree for section tag.
+ */
+ protected HtmlTree sectionTree = HtmlTree.SECTION();
+
+ /**
* Constructor to construct PackageWriter object and to generate
* "package-summary.html" file in the respective package directory.
* For example for package "java.lang" this will generate file
@@ -90,9 +100,15 @@
* {@inheritDoc}
*/
public Content getPackageHeader(String heading) {
- Content bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.header);
Content annotationContent = new HtmlTree(HtmlTag.P);
@@ -117,7 +133,11 @@
Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
div.addContent(descPara);
}
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
@@ -169,8 +189,9 @@
if(classes.length > 0) {
Arrays.sort(classes);
Content caption = getTableCaption(new RawHtml(label));
- Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
- tableSummary, caption);
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.typeSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.typeSummary, tableSummary, caption);
table.addContent(getSummaryTableHeader(tableHeader, "col"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
for (int i = 0; i < classes.length; i++) {
@@ -216,9 +237,14 @@
Content h2Content = new StringContent(
configuration.getText("doclet.Package_Description",
packageDoc.name()));
- packageContentTree.addContent(HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING,
- true, h2Content));
- addInlineComment(packageDoc, packageContentTree);
+ Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ sectionTree.addContent(heading);
+ addInlineComment(packageDoc, sectionTree);
+ } else {
+ packageContentTree.addContent(heading);
+ addInlineComment(packageDoc, packageContentTree);
+ }
}
}
@@ -226,15 +252,37 @@
* {@inheritDoc}
*/
public void addPackageTags(Content packageContentTree) {
- addTagsInfo(packageDoc, packageContentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? sectionTree
+ : packageContentTree;
+ addTagsInfo(packageDoc, htmlTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addPackageContent(Content contentTree, Content packageContentTree) {
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ packageContentTree.addContent(sectionTree);
+ mainTree.addContent(packageContentTree);
+ contentTree.addContent(mainTree);
+ } else {
+ contentTree.addContent(packageContentTree);
+ }
}
/**
* {@inheritDoc}
*/
public void addPackageFooter(Content contentTree) {
- addNavLinks(false, contentTree);
- addBottom(contentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : contentTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ contentTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -85,7 +85,9 @@
String tableSummary, Content body) {
Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true,
profilesLabel);
- Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
+ : HtmlTree.DIV(HtmlStyle.indexContainer, heading);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(profilesLabel);
String profileName;
@@ -96,8 +98,8 @@
if (configuration.shouldDocumentProfile(profileName))
ul.addContent(getProfile(profileName));
}
- div.addContent(ul);
- body.addContent(div);
+ htmlTree.addContent(ul);
+ body.addContent(htmlTree);
}
/**
@@ -141,26 +143,26 @@
* Adds "All Classes" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all classes link should be added
+ * @param ul the Content object to which the all classes link should be added
*/
- protected void addAllClassesLink(Content div) {
+ protected void addAllClassesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
allclassesLabel, "", "packageFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
* Adds "All Packages" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all packages link should be added
+ * @param ul the Content object to which the all packages link should be added
*/
- protected void addAllPackagesLink(Content div) {
+ protected void addAllPackagesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
allpackagesLabel, "", "packageListFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -93,21 +93,27 @@
winTitle.append(sep);
String pkgName = configuration.utils.getPackageName(packageDoc);
winTitle.append(pkgName);
- Content body = profpackgen.getBody(false,
+ HtmlTree body = profpackgen.getBody(false,
profpackgen.getWindowTitle(winTitle.toString()));
Content profName = new StringContent(profileName);
Content sepContent = new StringContent(sep);
Content pkgNameContent = new RawHtml(pkgName);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN()
+ : body;
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
profpackgen.getTargetProfileLink("classFrame", profName, profileName));
heading.addContent(sepContent);
heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc,
"classFrame", pkgNameContent, profileName));
- body.addContent(heading);
+ htmlTree.addContent(heading);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.indexContainer);
profpackgen.addClassListing(div, profileValue);
- body.addContent(div);
+ htmlTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ body.addContent(htmlTree);
+ }
profpackgen.printHtmlDocument(
configuration.metakeywords.getMetaKeywords(packageDoc), false, body);
profpackgen.close();
@@ -127,7 +133,7 @@
* @param contentTree the content tree to which the listing will be added
* @param profileValue the value of the profile being documented
*/
- protected void addClassListing(Content contentTree, int profileValue) {
+ protected void addClassListing(HtmlTree contentTree, int profileValue) {
if (packageDoc.isIncluded()) {
addClassKindListing(packageDoc.interfaces(),
getResource("doclet.Interfaces"), contentTree, profileValue);
@@ -153,10 +159,13 @@
* @param profileValue the value of the profile being documented
*/
protected void addClassKindListing(ClassDoc[] arr, Content labelContent,
- Content contentTree, int profileValue) {
+ HtmlTree contentTree, int profileValue) {
if(arr.length > 0) {
Arrays.sort(arr);
boolean printedHeader = false;
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION()
+ : contentTree;
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(labelContent);
for (ClassDoc classDoc : arr) {
@@ -170,7 +179,7 @@
if (!printedHeader) {
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
true, labelContent);
- contentTree.addContent(heading);
+ htmlTree.addContent(heading);
printedHeader = true;
}
Content arr_i_name = new StringContent(classDoc.name());
@@ -181,7 +190,10 @@
Content li = HtmlTree.LI(link);
ul.addContent(li);
}
- contentTree.addContent(ul);
+ htmlTree.addContent(ul);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ contentTree.addContent(htmlTree);
+ }
}
}
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -90,7 +90,9 @@
getTargetProfileLink("classFrame", profNameContent, profileName));
heading.addContent(getSpace());
heading.addContent(packagesLabel);
- Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
+ : HtmlTree.DIV(HtmlStyle.indexContainer, heading);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(packagesLabel);
List<PackageDoc> packages = configuration.profilePackages.get(profileName);
@@ -99,8 +101,8 @@
ul.addContent(getPackage(packageDoc, profileName));
}
}
- div.addContent(ul);
- body.addContent(div);
+ htmlTree.addContent(ul);
+ body.addContent(htmlTree);
}
/**
@@ -156,39 +158,39 @@
* Adds "All Classes" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all classes link should be added
+ * @param ul the Content object to which the all classes link should be added
*/
- protected void addAllClassesLink(Content div) {
+ protected void addAllClassesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
allclassesLabel, "", "packageFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
* Adds "All Packages" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all packages link should be added
+ * @param ul the Content object to which the all packages link should be added
*/
- protected void addAllPackagesLink(Content div) {
+ protected void addAllPackagesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
allpackagesLabel, "", "packageListFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
* Adds "All Profiles" link for the top of the left-hand frame page to the
* documentation tree.
*
- * @param div the Content object to which the all profiles link should be added
+ * @param ul the Content object to which the all profiles link should be added
*/
- protected void addAllProfilesLink(Content div) {
+ protected void addAllProfilesLink(Content ul) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
allprofilesLabel, "", "packageListFrame");
- Content span = HtmlTree.SPAN(linkContent);
- div.addContent(span);
+ Content li = HtmlTree.LI(linkContent);
+ ul.addContent(li);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -74,6 +74,16 @@
protected int profileValue;
/**
+ * The HTML tree for main tag.
+ */
+ protected HtmlTree mainTree = HtmlTree.MAIN();
+
+ /**
+ * The HTML tree for section tag.
+ */
+ protected HtmlTree sectionTree = HtmlTree.SECTION();
+
+ /**
* Constructor to construct ProfilePackageWriter object and to generate
* "profilename-package-summary.html" file in the respective package directory.
* For example for profile compact1 and package "java.lang" this will generate file
@@ -103,9 +113,15 @@
* {@inheritDoc}
*/
public Content getPackageHeader(String heading) {
- Content bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.header);
Content profileContent = new StringContent(profileName);
@@ -133,7 +149,11 @@
Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
div.addContent(descPara);
}
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
@@ -199,9 +219,14 @@
Content h2Content = new StringContent(
configuration.getText("doclet.Package_Description",
packageDoc.name()));
- packageContentTree.addContent(HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING,
- true, h2Content));
- addInlineComment(packageDoc, packageContentTree);
+ Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ sectionTree.addContent(heading);
+ addInlineComment(packageDoc, sectionTree);
+ } else {
+ packageContentTree.addContent(heading);
+ addInlineComment(packageDoc, packageContentTree);
+ }
}
}
@@ -209,15 +234,37 @@
* {@inheritDoc}
*/
public void addPackageTags(Content packageContentTree) {
- addTagsInfo(packageDoc, packageContentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? sectionTree
+ : packageContentTree;
+ addTagsInfo(packageDoc, htmlTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addPackageContent(Content contentTree, Content packageContentTree) {
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ packageContentTree.addContent(sectionTree);
+ mainTree.addContent(packageContentTree);
+ contentTree.addContent(mainTree);
+ } else {
+ contentTree.addContent(packageContentTree);
+ }
}
/**
* {@inheritDoc}
*/
public void addPackageFooter(Content contentTree) {
- addNavLinks(false, contentTree);
- addBottom(contentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : contentTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ contentTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -65,6 +65,11 @@
protected Profile profile;
/**
+ * The HTML tree for main tag.
+ */
+ protected HtmlTree mainTree = HtmlTree.MAIN();
+
+ /**
* Constructor to construct ProfileWriter object and to generate
* "profileName-summary.html" file.
*
@@ -87,9 +92,15 @@
*/
public Content getProfileHeader(String heading) {
String profileName = profile.name;
- Content bodyTree = getBody(true, getWindowTitle(profileName));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(profileName));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.header);
Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
@@ -98,7 +109,11 @@
Content profileHead = new RawHtml(heading);
tHeading.addContent(profileHead);
div.addContent(tHeading);
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
@@ -133,20 +148,29 @@
* {@inheritDoc}
*/
public Content getPackageSummaryHeader(PackageDoc pkg) {
- Content pkgName = getTargetProfilePackageLink(pkg,
- "classFrame", new StringContent(pkg.name()), profile.name);
- Content heading = HtmlTree.HEADING(HtmlTag.H3, pkgName);
- HtmlTree li = HtmlTree.LI(HtmlStyle.blockList, heading);
- addPackageDeprecationInfo(li, pkg);
- return li;
+ Content pkgName = new StringContent(pkg.name());
+ Content pkgNameLink = getTargetProfilePackageLink(pkg,
+ "classFrame", pkgName, profile.name);
+ Content heading = HtmlTree.HEADING(HtmlTag.H3, pkgNameLink);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(heading)
+ : HtmlTree.LI(HtmlStyle.blockList, heading);
+ addPackageDeprecationInfo(htmlTree, pkg);
+ return htmlTree;
}
/**
* {@inheritDoc}
*/
public Content getPackageSummaryTree(Content packageSummaryContentTree) {
- HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, packageSummaryContentTree);
- return ul;
+ HtmlTree htmlTree;
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ htmlTree = HtmlTree.UL(HtmlStyle.blockList,
+ HtmlTree.LI(HtmlStyle.blockList, packageSummaryContentTree));
+ } else {
+ htmlTree = HtmlTree.UL(HtmlStyle.blockList, packageSummaryContentTree);
+ }
+ return htmlTree;
}
/**
@@ -161,9 +185,27 @@
/**
* {@inheritDoc}
*/
+ public void addProfileContent(Content contentTree, Content profileContentTree) {
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(profileContentTree);
+ contentTree.addContent(mainTree);
+ } else {
+ contentTree.addContent(profileContentTree);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void addProfileFooter(Content contentTree) {
- addNavLinks(false, contentTree);
- addBottom(contentTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : contentTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ contentTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -66,6 +66,13 @@
/**
* {@inheritDoc}
*/
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ writer.addMemberTree(memberSummaryTree, memberTree);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public Content getPropertyDetailsTreeHeader(ClassDoc classDoc,
Content memberDetailsTree) {
memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS);
@@ -157,6 +164,10 @@
* {@inheritDoc}
*/
public Content getPropertyDetails(Content propertyDetailsTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(propertyDetailsTree));
+ return htmlTree;
+ }
return getMemberTree(propertyDetailsTree);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -27,6 +27,7 @@
import java.io.*;
import java.util.*;
+
import com.sun.javadoc.*;
import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*;
@@ -49,6 +50,11 @@
List<ClassDoc> visibleClasses;
/**
+ * HTML tree for main tag.
+ */
+ private HtmlTree mainTree = HtmlTree.MAIN();
+
+ /**
* @param configuration the configuration data for the doclet
* @throws IOException
* @throws DocletAbortException
@@ -66,14 +72,24 @@
* @return the body content tree
*/
public Content getHeader(String header) {
- Content bodyTree = getBody(true, getWindowTitle(header));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(header));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
Content h1Content = new StringContent(header);
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
HtmlStyle.title, h1Content);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
- bodyTree.addContent(div);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(div);
+ } else {
+ bodyTree.addContent(div);
+ }
return bodyTree;
}
@@ -94,9 +110,14 @@
* @return the package serialized form header tree
*/
public Content getPackageSerializedHeader() {
- HtmlTree li = new HtmlTree(HtmlTag.LI);
- li.addStyle(HtmlStyle.blockList);
- return li;
+ HtmlTree htmlTree;
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ htmlTree = HtmlTree.SECTION();
+ } else {
+ htmlTree = new HtmlTree(HtmlTag.LI);
+ htmlTree.addStyle(HtmlStyle.blockList);
+ }
+ return htmlTree;
}
/**
@@ -211,9 +232,24 @@
* @return a div content tree
*/
public Content getSerializedContent(Content serializedTreeContent) {
- Content divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
+ HtmlTree divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
serializedTreeContent);
- return divContent;
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(divContent);
+ return mainTree;
+ } else {
+ return divContent;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addPackageSerializedTree(Content serializedSummariesTree,
+ Content packageSerializedTree) {
+ serializedSummariesTree.addContent((configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree)
+ : packageSerializedTree);
}
/**
@@ -222,8 +258,14 @@
* @param serializedTree the serialized tree to be added
*/
public void addFooter(Content serializedTree) {
- addNavLinks(false, serializedTree);
- addBottom(serializedTree);
+ Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+ ? HtmlTree.FOOTER()
+ : serializedTree;
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ serializedTree.addContent(htmlTree);
+ }
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -89,9 +89,15 @@
*/
protected void generateIndexFile() throws IOException {
String title = configuration.getText("doclet.Window_Single_Index");
- Content body = getBody(true, getWindowTitle(title));
- addTop(body);
- addNavLinks(true, body);
+ HtmlTree body = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : body;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ body.addContent(htmlTree);
+ }
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.addStyle(HtmlStyle.contentContainer);
addLinksForIndexes(divTree);
@@ -100,9 +106,17 @@
addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
}
addLinksForIndexes(divTree);
- body.addContent(divTree);
- addNavLinks(false, body);
- addBottom(body);
+ body.addContent((configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN(divTree)
+ : divTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ htmlTree = HtmlTree.FOOTER();
+ }
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
printHtmlDocument(null, true, body);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -176,7 +176,7 @@
}
addBlankLines(pre);
Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
- body.addContent(div);
+ body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(div) : div);
writeToFile(body, outputdir.resolve(DocPath.forClass(cd)));
} catch (IOException e) {
e.printStackTrace();
@@ -190,7 +190,9 @@
* @param path the path for the file.
*/
private void writeToFile(Content body, DocPath path) throws IOException {
- Content htmlDocType = DocType.TRANSITIONAL;
+ Content htmlDocType = configuration.isOutputHtml5()
+ ? DocType.HTML5
+ : DocType.TRANSITIONAL;
Content head = new HtmlTree(HtmlTag.HEAD);
head.addContent(HtmlTree.TITLE(new StringContent(
configuration.getText("doclet.Window_Source_title"))));
@@ -262,8 +264,8 @@
*/
private void addLine(Content pre, String line, int currentLineNo) {
if (line != null) {
- pre.addContent(utils.replaceTabs(configuration, line));
- Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo));
+ Content anchor = HtmlTree.A_ID("line." + Integer.toString(currentLineNo),
+ new StringContent(utils.replaceTabs(configuration, line)));
pre.addContent(anchor);
pre.addContent(NEW_LINE);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -116,17 +116,29 @@
protected void generateIndexFile(Character unicode) throws IOException {
String title = configuration.getText("doclet.Window_Split_Index",
unicode.toString());
- Content body = getBody(true, getWindowTitle(title));
- addTop(body);
- addNavLinks(true, body);
+ HtmlTree body = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : body;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ body.addContent(htmlTree);
+ }
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.addStyle(HtmlStyle.contentContainer);
addLinksForIndexes(divTree);
addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
addLinksForIndexes(divTree);
- body.addContent(divTree);
- addNavLinks(false, body);
- addBottom(body);
+ body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(divTree) : divTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ htmlTree = HtmlTree.FOOTER();
+ }
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
printHtmlDocument(null, true, body);
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -55,6 +55,11 @@
*/
public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
+ /**
+ * The HTML tree for main tag.
+ */
+ protected HtmlTree mainTree = HtmlTree.MAIN();
+
public SubWriterHolderWriter(ConfigurationImpl configuration, DocPath filename)
throws IOException {
super(configuration, filename);
@@ -92,8 +97,9 @@
else {
caption = getTableCaption(mw.getCaption());
}
- Content table = HtmlTree.TABLE(HtmlStyle.memberSummary, 0, 3, 0,
- mw.getTableSummary(), caption);
+ Content table = (configuration.isOutputHtml5())
+ ? HtmlTree.TABLE(HtmlStyle.memberSummary, caption)
+ : HtmlTree.TABLE(HtmlStyle.memberSummary, mw.getTableSummary(), caption);
table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col"));
for (Content tableContent : tableContents) {
table.addContent(tableContent);
@@ -261,6 +267,31 @@
}
/**
+ * Add the class content tree.
+ *
+ * @param contentTree content tree to which the class content will be added
+ * @param classContentTree class content tree which will be added to the content tree
+ */
+ public void addClassContentTree(Content contentTree, Content classContentTree) {
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ mainTree.addContent(classContentTree);
+ contentTree.addContent(mainTree);
+ } else {
+ contentTree.addContent(classContentTree);
+ }
+ }
+
+ /**
+ * Add the annotation content tree.
+ *
+ * @param contentTree content tree to which the annotation content will be added
+ * @param annotationContentTree annotation content tree which will be added to the content tree
+ */
+ public void addAnnotationContentTree(Content contentTree, Content annotationContentTree) {
+ addClassContentTree(contentTree, annotationContentTree);
+ }
+
+ /**
* Get the member header tree
*
* @return a content tree the member header
@@ -272,6 +303,21 @@
}
/**
+ * Add the member tree.
+ *
+ * @param memberSummaryTree the content tree representing the member summary
+ * @param memberTree the content tree representing the member
+ */
+ public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(memberTree));
+ memberSummaryTree.addContent(htmlTree);
+ } else {
+ memberSummaryTree.addContent(getMemberTree(memberTree));
+ }
+ }
+
+ /**
* Get the member tree
*
* @param contentTree the tree used to generate the complete member tree
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -101,22 +101,36 @@
* Generate the interface hierarchy and class hierarchy.
*/
public void generateTreeFile() throws IOException {
- Content body = getTreeHeader();
+ HtmlTree body = getTreeHeader();
Content headContent = getResource("doclet.Hierarchy_For_All_Packages");
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
addPackageTreeLinks(div);
- body.addContent(div);
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+ ? HtmlTree.MAIN()
+ : body;
+ htmlTree.addContent(div);
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.addStyle(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);
- body.addContent(divTree);
- addNavLinks(false, body);
- addBottom(body);
+ htmlTree.addContent(divTree);
+ if (configuration.allowTag(HtmlTag.MAIN)) {
+ body.addContent(htmlTree);
+ }
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ htmlTree = HtmlTree.FOOTER();
+ } else {
+ htmlTree = body;
+ }
+ addNavLinks(false, htmlTree);
+ addBottom(htmlTree);
+ if (configuration.allowTag(HtmlTag.FOOTER)) {
+ body.addContent(htmlTree);
+ }
printHtmlDocument(null, true, body);
}
@@ -164,11 +178,17 @@
*
* @return a content tree for the tree header
*/
- protected Content getTreeHeader() {
+ protected HtmlTree getTreeHeader() {
String title = configuration.getText("doclet.Window_Class_Hierarchy");
- Content bodyTree = getBody(true, getWindowTitle(title));
- addTop(bodyTree);
- addNavLinks(true, bodyTree);
+ HtmlTree bodyTree = getBody(true, getWindowTitle(title));
+ HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+ ? HtmlTree.HEADER()
+ : bodyTree;
+ addTop(htmlTree);
+ addNavLinks(true, htmlTree);
+ if (configuration.allowTag(HtmlTag.HEADER)) {
+ bodyTree.addContent(htmlTree);
+ }
return bodyTree;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java Mon Apr 13 18:05:23 2015 -0700
@@ -48,10 +48,13 @@
public static final DocType TRANSITIONAL =
new DocType("Transitional", "http://www.w3.org/TR/html4/loose.dtd");
+ public static final DocType HTML5 = new DocType();
+
/**
* Constructor to construct a DocType object.
*
* @param type the doctype to be added
+ * @param dtd the dtd of the doctype
*/
private DocType(String type, String dtd) {
docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " + type +
@@ -59,6 +62,13 @@
}
/**
+ * Constructor to construct a DocType object.
+ */
+ private DocType() {
+ docType = "<!DOCTYPE HTML>" + DocletConstants.NL;
+ }
+
+ /**
* This method is not supported by the class.
*
* @param content content that needs to be added
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -39,9 +39,6 @@
*/
public enum HtmlAttr {
ALT,
- BORDER,
- CELLPADDING,
- CELLSPACING,
CLASS,
CLEAR,
COLS,
@@ -53,6 +50,7 @@
NAME,
ONLOAD,
REL,
+ ROLE,
ROWS,
SCOPE,
SCROLLING,
@@ -65,6 +63,25 @@
private final String value;
+ public enum Role {
+
+ BANNER,
+ CONTENTINFO,
+ MAIN,
+ NAVIGATION,
+ REGION;
+
+ private final String role;
+
+ Role() {
+ role = StringUtils.toLowerCase(name());
+ }
+
+ public String toString() {
+ return role;
+ }
+ }
+
HtmlAttr() {
this.value = StringUtils.toLowerCase(name());
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -307,11 +307,13 @@
*
* @param title Title of this HTML document
* @param configuration the configuration object
- * @param frame the frame content tree to be added to the HTML document
+ * @param body the body content tree to be added to the HTML document
*/
public void printFramesDocument(String title, ConfigurationImpl configuration,
HtmlTree body) throws IOException {
- Content htmlDocType = DocType.TRANSITIONAL;
+ Content htmlDocType = configuration.isOutputHtml5()
+ ? DocType.HTML5
+ : DocType.TRANSITIONAL;
Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
Content head = new HtmlTree(HtmlTag.HEAD);
head.addContent(getGeneratedBy(!configuration.notimestamp));
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java Mon Apr 13 18:05:23 2015 -0700
@@ -44,6 +44,7 @@
blockList,
blockListLast,
bottomNav,
+ circle,
classUseContainer,
colFirst,
colLast,
@@ -64,7 +65,7 @@
horizontal,
footer,
indexContainer,
- indexHeader,
+ indexNav,
inheritance,
interfaceName,
leftContainer,
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java Mon Apr 13 18:05:23 2015 -0700
@@ -43,15 +43,16 @@
BODY(BlockType.OTHER, EndTag.END),
BR(BlockType.INLINE, EndTag.NOEND),
CAPTION,
- CENTER,
+ CENTER(HtmlVersion.HTML4),
CODE(BlockType.INLINE, EndTag.END),
DD,
- DIR,
+ DIR(HtmlVersion.HTML4),
DIV,
DL,
DT,
EM(BlockType.INLINE, EndTag.END),
- FONT(BlockType.INLINE, EndTag.END),
+ FONT(HtmlVersion.HTML4, BlockType.INLINE, EndTag.END),
+ FOOTER(HtmlVersion.HTML5),
H1,
H2,
H3,
@@ -59,6 +60,7 @@
H5,
H6,
HEAD(BlockType.OTHER, EndTag.END),
+ HEADER(HtmlVersion.HTML5),
HR(BlockType.BLOCK, EndTag.NOEND),
HTML(BlockType.OTHER, EndTag.END),
I(BlockType.INLINE, EndTag.END),
@@ -67,14 +69,16 @@
LI,
LISTING,
LINK(BlockType.OTHER, EndTag.NOEND),
+ MAIN(HtmlVersion.HTML5),
MENU,
META(BlockType.OTHER, EndTag.NOEND),
- NOFRAMES(BlockType.OTHER, EndTag.END),
+ NAV(HtmlVersion.HTML5),
NOSCRIPT(BlockType.OTHER, EndTag.END),
OL,
P,
PRE,
SCRIPT(BlockType.OTHER, EndTag.END),
+ SECTION(HtmlVersion.HTML5),
SMALL(BlockType.INLINE, EndTag.END),
SPAN(BlockType.INLINE, EndTag.END),
STRONG(BlockType.INLINE, EndTag.END),
@@ -85,12 +89,13 @@
TH,
TITLE(BlockType.OTHER, EndTag.END),
TR,
- TT(BlockType.INLINE, EndTag.END),
+ TT(HtmlVersion.HTML4, BlockType.INLINE, EndTag.END),
UL;
public final BlockType blockType;
public final EndTag endTag;
public final String value;
+ public final HtmlVersion htmlVersion;
/**
* Enum representing the type of HTML element.
@@ -110,10 +115,19 @@
}
HtmlTag() {
- this(BlockType.BLOCK, EndTag.END);
+ this(HtmlVersion.ALL, BlockType.BLOCK, EndTag.END);
+ }
+
+ HtmlTag(HtmlVersion htmlVersion) {
+ this(htmlVersion, BlockType.BLOCK, EndTag.END);
}
HtmlTag(BlockType blockType, EndTag endTag ) {
+ this(HtmlVersion.ALL, blockType, endTag);
+ }
+
+ HtmlTag(HtmlVersion htmlVersion, BlockType blockType, EndTag endTag ) {
+ this.htmlVersion = htmlVersion;
this.blockType = blockType;
this.endTag = endTag;
this.value = StringUtils.toLowerCase(name());
@@ -129,6 +143,16 @@
return (endTag == EndTag.END);
}
+ /**
+ * Returns true if the tag is allowed in the output HTML version of this javadoc run.
+ *
+ * @param htmlVer the output HTML version for this javadoc run
+ * @return true if the tag is allowed
+ */
+ public boolean allowTag(HtmlVersion htmlVer) {
+ return (this.htmlVersion == HtmlVersion.ALL || this.htmlVersion == htmlVer);
+ }
+
public String toString() {
return value;
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java Mon Apr 13 18:05:23 2015 -0700
@@ -32,6 +32,7 @@
import com.sun.tools.doclets.internal.toolkit.Content;
import com.sun.tools.doclets.internal.toolkit.util.*;
+import com.sun.tools.doclets.formats.html.markup.HtmlAttr.Role;
/**
* Class for generating HTML tree for javadoc output.
@@ -87,6 +88,10 @@
addAttr(HtmlAttr.TITLE, stripHtml(body));
}
+ public void setRole(Role role) {
+ addAttr(HtmlAttr.ROLE, role.toString());
+ }
+
/**
* Adds a style for the HTML tag.
*
@@ -221,31 +226,20 @@
}
/**
- * Generates an HTML anchor tag with name attribute and content.
+ * Generates an HTML anchor tag with id attribute and content.
*
- * @param name name for the anchor tag
+ * @param id id for the anchor tag
* @param body content for the anchor tag
* @return an HtmlTree object
*/
- public static HtmlTree A_NAME(String name, Content body) {
- HtmlTree htmltree = HtmlTree.A_NAME(name);
+ 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));
return htmltree;
}
/**
- * Generates an HTML anchor tag with name attribute.
- *
- * @param name name for the anchor tag
- * @return an HtmlTree object
- */
- public static HtmlTree A_NAME(String name) {
- HtmlTree htmltree = new HtmlTree(HtmlTag.A);
- htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
- return htmltree;
- }
-
- /**
* Generates a CAPTION tag with some content.
*
* @param body content for the tag
@@ -326,18 +320,24 @@
}
/**
- * Generates a IFRAME tag.
+ * Generates a FOOTER tag with role attribute.
*
- * @param src the url of the document to be shown in the frame
- * @param name specifies the name of the frame
- * @param title the title for the frame
- * @return an HtmlTree object for the IFRAME tag
+ * @return an HtmlTree object for the FOOTER tag
*/
- 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));
+ public static HtmlTree FOOTER() {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.FOOTER);
+ htmltree.setRole(Role.CONTENTINFO);
+ return htmltree;
+ }
+
+ /**
+ * Generates a HEADER tag with role attribute.
+ *
+ * @return an HtmlTree object for the HEADER tag
+ */
+ public static HtmlTree HEADER() {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.HEADER);
+ htmltree.setRole(Role.BANNER);
return htmltree;
}
@@ -414,6 +414,22 @@
}
/**
+ * Generates a IFRAME tag.
+ *
+ * @param src the url of the document to be shown in the frame
+ * @param name specifies the name of the frame
+ * @param title the title for the frame
+ * @return an HtmlTree object for the IFRAME tag
+ */
+ 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));
+ return htmltree;
+ }
+
+ /**
* Generates a LI tag with some content.
*
* @param body content for the tag
@@ -456,6 +472,44 @@
}
/**
+ * Generates a MAIN tag with role attribute.
+ *
+ * @return an HtmlTree object for the MAIN tag
+ */
+ public static HtmlTree MAIN() {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.MAIN);
+ htmltree.setRole(Role.MAIN);
+ return htmltree;
+ }
+
+ /**
+ * Generates a MAIN tag with role attribute and some content.
+ *
+ * @param body content of the MAIN tag
+ * @return an HtmlTree object for the MAIN tag
+ */
+ public static HtmlTree MAIN(Content body) {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.MAIN, nullCheck(body));
+ htmltree.setRole(Role.MAIN);
+ return htmltree;
+ }
+
+ /**
+ * Generates a MAIN tag with role attribute, style attribute and some content.
+ *
+ * @param styleClass style of the MAIN tag
+ * @param body content of the MAIN tag
+ * @return an HtmlTree object for the MAIN tag
+ */
+ public static HtmlTree MAIN(HtmlStyle styleClass, Content body) {
+ HtmlTree htmltree = HtmlTree.MAIN(body);
+ if (styleClass != null) {
+ htmltree.addStyle(styleClass);
+ }
+ return htmltree;
+ }
+
+ /**
* Generates a META tag with the http-equiv, content and charset attributes.
*
* @param httpEquiv http equiv attribute for the META tag
@@ -486,6 +540,17 @@
}
/**
+ * Generates a NAV tag with the role attribute.
+ *
+ * @return an HtmlTree object for the NAV tag
+ */
+ public static HtmlTree NAV() {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.NAV);
+ htmltree.setRole(Role.NAVIGATION);
+ return htmltree;
+ }
+
+ /**
* Generates a NOSCRIPT tag with some content.
*
* @param body content of the noscript tag
@@ -527,10 +592,43 @@
* @param src the path for the script
* @return an HtmlTree object for the SCRIPT tag
*/
- public static HtmlTree SCRIPT(String type, String src) {
+ public static HtmlTree SCRIPT(String src) {
+ HtmlTree htmltree = HtmlTree.SCRIPT();
+ htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
+ return htmltree;
+ }
+
+ /**
+ * Generates a SCRIPT tag with the type attribute.
+ *
+ * @return an HtmlTree object for the SCRIPT tag
+ */
+ public static HtmlTree SCRIPT() {
HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT);
- htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type));
- htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
+ htmltree.addAttr(HtmlAttr.TYPE, "text/javascript");
+ return htmltree;
+ }
+
+ /**
+ * Generates a SECTION tag with role attribute.
+ *
+ * @return an HtmlTree object for the SECTION tag
+ */
+ public static HtmlTree SECTION() {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.SECTION);
+ htmltree.setRole(Role.REGION);
+ return htmltree;
+ }
+
+ /**
+ * Generates a SECTION tag with role attribute and some content.
+ *
+ * @param body content of the section tag
+ * @return an HtmlTree object for the SECTION tag
+ */
+ public static HtmlTree SECTION(Content body) {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.SECTION, nullCheck(body));
+ htmltree.setRole(Role.REGION);
return htmltree;
}
@@ -587,30 +685,37 @@
}
/**
- * Generates a Table tag with style class, border, cell padding,
- * cellspacing and summary attributes and some content.
+ * Generates a Table tag with style class and summary attributes and some content.
*
* @param styleClass style of the table
- * @param border border for the table
- * @param cellPadding cell padding for the table
- * @param cellSpacing cell spacing for the table
* @param summary summary for the table
* @param body content for the table
* @return an HtmlTree object for the TABLE tag
*/
- public static HtmlTree TABLE(HtmlStyle styleClass, int border, int cellPadding,
- int cellSpacing, String summary, Content body) {
+ public static HtmlTree TABLE(HtmlStyle styleClass, String summary, Content body) {
HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
if (styleClass != null)
htmltree.addStyle(styleClass);
- htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border));
- htmltree.addAttr(HtmlAttr.CELLPADDING, Integer.toString(cellPadding));
- htmltree.addAttr(HtmlAttr.CELLSPACING, Integer.toString(cellSpacing));
htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
return htmltree;
}
/**
+ * Generates a Table tag with style class attribute and some content.
+ *
+ * @param styleClass style of the table
+ * @param body content for the table
+ * @return an HtmlTree object for the TABLE tag
+ */
+ public static HtmlTree TABLE(HtmlStyle styleClass, Content body) {
+ HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
+ if (styleClass != null) {
+ htmltree.addStyle(styleClass);
+ }
+ return htmltree;
+ }
+
+ /**
* Generates a TD tag with style class attribute and some content.
*
* @param styleClass style for the tag
@@ -741,7 +846,7 @@
public boolean isValid() {
switch (htmlTag) {
case A :
- return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent()));
+ return (hasAttr(HtmlAttr.ID) || (hasAttr(HtmlAttr.HREF) && hasContent()));
case BR :
return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));
case IFRAME :
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlVersion.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.doclets.formats.html.markup;
+
+/**
+ * Enum representing the version of HTML generated by javadoc.
+ *
+ * @author Bhavesh Patel
+ */
+public enum HtmlVersion {
+ HTML4,
+ HTML5,
+ ALL
+}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -306,9 +306,8 @@
* @return an HtmlTree for the SCRIPT tag
*/
protected HtmlTree getWinTitleScript(){
- HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
+ HtmlTree script = HtmlTree.SCRIPT();
if(winTitle != null && winTitle.length() > 0) {
- script.addAttr(HtmlAttr.TYPE, "text/javascript");
String scriptCode = "<!--" + DocletConstants.NL +
" try {" + DocletConstants.NL +
" if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
@@ -377,8 +376,7 @@
* @return a content for the SCRIPT tag
*/
protected Content getFramesJavaScript() {
- HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
- script.addAttr(HtmlAttr.TYPE, "text/javascript");
+ HtmlTree script = HtmlTree.SCRIPT();
String scriptCode = DocletConstants.NL +
" targetPage = \"\" + window.location.search;" + DocletConstants.NL +
" if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL +
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties Mon Apr 13 18:05:23 2015 -0700
@@ -192,6 +192,8 @@
\ -windowtitle <text> Browser window title for the documentation\n\
\ -doctitle <html-code> Include title for the overview page\n\
\ -header <html-code> Include header text for each page\n\
+\ -html4 Generate HTML 4.01 output\n\
+\ -html5 Generate HTML 5 output\n\
\ -footer <html-code> Include footer text for each page\n\
\ -top <html-code> Include top text for each page\n\
\ -bottom <html-code> Include bottom text for each page\n\
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -111,6 +111,14 @@
public Content getMemberTreeHeader();
/**
+ * Add the annotation content tree to the documentation content tree.
+ *
+ * @param contentTree content tree to which the annotation content will be added
+ * @param annotationContentTree annotation content tree which will be added to the content tree
+ */
+ public void addAnnotationContentTree(Content contentTree, Content annotationContentTree);
+
+ /**
* Get the member tree.
*
* @param memberTree the content tree that will be modified and returned
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -176,6 +176,14 @@
public Content getMemberTreeHeader();
/**
+ * Add the class content tree.
+ *
+ * @param contentTree content tree to which the class content will be added
+ * @param classContentTree class content tree which will be added to the content tree
+ */
+ public void addClassContentTree(Content contentTree, Content classContentTree);
+
+ /**
* Add the footer of the page.
*
* @param contentTree content tree to which the footer will be added
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,12 +81,12 @@
Set<String> WriteedPackageHeaders, Content contentListTree);
/**
- * Get the content list to be added to the documentation tree.
+ * Add the content list to the documentation tree.
*
+ * @param contentTree the tree to which the contents list will be added
* @param contentListTree the content that will be added to the list
- * @return content list that will be added to the documentation tree
*/
- public abstract Content getContentsList(Content contentListTree);
+ public abstract void addContentsList(Content contentTree, Content contentListTree);
/**
* Get the constant summaries for the document.
@@ -98,16 +98,15 @@
/**
* Adds the given package name.
*
- * @param pkg the {@link PackageDoc} to index.
* @param parsedPackageName the parsed package name. We only Write the
* first 2 directory levels of the package
* name. For example, java.lang.ref would be
* indexed as java.lang.*.
- * @param summariesTree the documentation tree to which the package name will
+ * @param summariesTree the summaries documentation tree
+ * @param first true if the first package is listed
* be written
*/
- public abstract void addPackageName(PackageDoc pkg,
- String parsedPackageName, Content summariesTree);
+ public abstract void addPackageName(String parsedPackageName, Content summariesTree, boolean first);
/**
* Get the class summary header for the constants summary.
@@ -117,6 +116,14 @@
public abstract Content getClassConstantHeader();
/**
+ * Add the content list to the documentation summaries tree.
+ *
+ * @param summariesTree the tree to which the class constants list will be added
+ * @param classConstantTree the class constant tree that will be added to the list
+ */
+ public abstract void addClassConstant(Content summariesTree, Content classConstantTree);
+
+ /**
* Adds the constant member table to the documentation tree.
*
* @param cd the class whose constants are being documented.
@@ -128,6 +135,14 @@
Content classConstantTree);
/**
+ * Add the summaries list to the content tree.
+ *
+ * @param contentTree the tree to which the summaries list will be added
+ * @param summariesTree the summaries content tree that will be added to the list
+ */
+ public abstract void addConstantSummaries(Content contentTree, Content summariesTree);
+
+ /**
* Adds the footer for the summary documentation.
*
* @param contentTree content tree to which the footer will be added
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -100,14 +100,22 @@
/**
* Get inherited summary links.
*
- * @return a content tree conatining the inherited summary links
+ * @return a content tree containing the inherited summary links
*/
public Content getInheritedSummaryLinksTree();
/**
+ * Add the member tree to the member summary tree.
+ *
+ * @param memberSummaryTree the content tree representing the member summary
+ * @param memberTree the content tree representing the member
+ */
+ public void addMemberTree(Content memberSummaryTree, Content memberTree);
+
+ /**
* Get the member tree.
*
- * @param memberTree the content tree representating the member
+ * @param memberTree the content tree representing the member
* @return a content tree for the member
*/
public Content getMemberTree(Content memberTree);
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,6 +97,15 @@
public abstract void addPackageTags(Content packageContentTree);
/**
+ * Adds the tag information from the "packages.html" or "package-info.java" file to the
+ * documentation tree.
+ *
+ * @param contentTree the content tree to which the package content tree will be added
+ * @param packageContentTree the package content tree to be added
+ */
+ public abstract void addPackageContent(Content contentTree, Content packageContentTree);
+
+ /**
* Adds the footer to the documentation tree.
*
* @param contentTree the tree to which the footer will be added
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ProfilePackageSummaryWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ProfilePackageSummaryWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015 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
@@ -95,6 +95,15 @@
public abstract void addPackageTags(Content packageContentTree);
/**
+ * Adds the tag information from the "packages.html" or "package-info.java" file to the
+ * documentation tree.
+ *
+ * @param contentTree the content tree to which the package content tree will be added
+ * @param packageContentTree the package content tree to be added
+ */
+ public abstract void addPackageContent(Content contentTree, Content packageContentTree);
+
+ /**
* Adds the footer to the documentation tree.
*
* @param contentTree the tree to which the footer will be added
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ProfileSummaryWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ProfileSummaryWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015 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
@@ -99,6 +99,14 @@
String tableSummary, String[] tableHeader, Content packageSummaryContentTree);
/**
+ * Adds the profile content tree to the documentation tree.
+ *
+ * @param contentTree the tree to which the profile content tree will be added
+ * @param profileContentTree the content tree that will be added
+ */
+ public abstract void addProfileContent(Content contentTree, Content profileContentTree);
+
+ /**
* Adds the footer to the documentation tree.
*
* @param contentTree the tree to which the footer will be added
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -66,6 +66,14 @@
public Content getPackageSerializedHeader();
/**
+ * Add the serialized tree per package to the serialized summaries tree.
+ *
+ * @param serializedSummariesTree the serialized tree to which the package serialized tree will be added
+ * @param packageSerializedTree the serialized tree per package that needs to be added
+ */
+ public void addPackageSerializedTree(Content serializedSummariesTree, Content packageSerializedTree);
+
+ /**
* Get the given package header.
*
* @param packageName the package header to write
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -118,7 +118,7 @@
" " + annotationTypeDoc.name());
Content annotationContentTree = writer.getAnnotationContentHeader();
buildChildren(node, annotationContentTree);
- contentTree.addContent(annotationContentTree);
+ writer.addAnnotationContentTree(contentTree, annotationContentTree);
writer.addFooter(contentTree);
writer.printDocument(contentTree);
writer.close();
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -144,7 +144,7 @@
classDoc.name());
Content classContentTree = writer.getClassContentHeader();
buildChildren(node, classContentTree);
- contentTree.addContent(classContentTree);
+ writer.addClassContentTree(contentTree, classContentTree);
writer.addFooter(contentTree);
writer.printDocument(contentTree);
writer.close();
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -88,6 +88,11 @@
private Content contentTree;
/**
+ * True if first package is listed.
+ */
+ private boolean first = true;
+
+ /**
* Construct a new ConstantsSummaryBuilder.
*
* @param context the build context.
@@ -159,7 +164,7 @@
printedPackageHeaders, contentListTree);
}
}
- contentTree.addContent(writer.getContentsList(contentListTree));
+ writer.addContentsList(contentTree, contentListTree);
}
/**
@@ -176,9 +181,10 @@
currentPackage = aPackage;
//Build the documentation for the current package.
buildChildren(node, summariesTree);
+ first = false;
}
}
- contentTree.addContent(summariesTree);
+ writer.addConstantSummaries(contentTree, summariesTree);
}
/**
@@ -190,8 +196,7 @@
public void buildPackageHeader(XMLNode node, Content summariesTree) {
String parsedPackageName = parsePackageName(currentPackage.name());
if (! printedPackageHeaders.contains(parsedPackageName)) {
- writer.addPackageName(currentPackage,
- parsePackageName(currentPackage.name()), summariesTree);
+ writer.addPackageName(parsePackageName(currentPackage.name()), summariesTree, first);
printedPackageHeaders.add(parsedPackageName);
}
}
@@ -218,7 +223,7 @@
//Build the documentation for the current class.
buildChildren(node, classConstantTree);
}
- summariesTree.addContent(classConstantTree);
+ writer.addClassConstant(summariesTree, classConstantTree);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -524,7 +524,7 @@
for (Content aSummaryTreeList : summaryTreeList) {
memberTree.addContent(aSummaryTreeList);
}
- memberSummaryTree.addContent(writer.getMemberTree(memberTree));
+ writer.addMemberTree(memberSummaryTree, memberTree);
}
}
}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,7 +137,7 @@
public void buildContent(XMLNode node, Content contentTree) {
Content packageContentTree = packageWriter.getContentHeader();
buildChildren(node, packageContentTree);
- contentTree.addContent(packageContentTree);
+ packageWriter.addPackageContent(contentTree, packageContentTree);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfilePackageSummaryBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfilePackageSummaryBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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,7 +153,7 @@
public void buildContent(XMLNode node, Content contentTree) {
Content packageContentTree = profilePackageWriter.getContentHeader();
buildChildren(node, packageContentTree);
- contentTree.addContent(packageContentTree);
+ profilePackageWriter.addPackageContent(contentTree, packageContentTree);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfileSummaryBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfileSummaryBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -142,7 +142,7 @@
public void buildContent(XMLNode node, Content contentTree) {
Content profileContentTree = profileWriter.getContentHeader();
buildChildren(node, profileContentTree);
- contentTree.addContent(profileContentTree);
+ profileWriter.addProfileContent(contentTree, profileContentTree);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -190,7 +190,7 @@
return;
}
buildChildren(node, packageSerializedTree);
- serializedSummariesTree.addContent(packageSerializedTree);
+ writer.addPackageSerializedTree(serializedSummariesTree, packageSerializedTree);
}
/**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css Mon Apr 13 18:05:23 2015 -0700
@@ -214,14 +214,20 @@
margin:0 20px;
padding:5px 0 0 0;
}
-.indexHeader {
+.indexNav {
margin:10px;
position:relative;
}
-.indexHeader span{
- margin-right:15px;
+.indexNav ul {
+ padding:0;
+ margin:0;
}
-.indexHeader h1 {
+.indexNav ul li {
+ display:inline;
+ list-style-type:none;
+ padding-right:10px;
+}
+.indexNav h1 {
font-size:13px;
}
.title {
@@ -314,6 +320,9 @@
/*
List styles
*/
+li.circle {
+ list-style:circle;
+}
ul.horizontal li {
display:inline;
font-size:0.9em;
@@ -370,6 +379,7 @@
*/
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
width:100%;
+ border-spacing:0;
border-left:1px solid #EEE;
border-right:1px solid #EEE;
border-bottom:1px solid #EEE;
@@ -638,3 +648,9 @@
overflow:visible;
margin-bottom:30px;
}
+/*
+HTML5 specific styles
+*/
+main, nav, header, footer, section {
+ display:block;
+}
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/DocEnv.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/DocEnv.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -814,7 +814,7 @@
return result;
}
- void initDoclint(Collection<String> opts, Collection<String> customTagNames) {
+ void initDoclint(Collection<String> opts, Collection<String> customTagNames, String htmlVersion) {
ArrayList<String> doclintOpts = new ArrayList<>();
for (String opt: opts) {
@@ -836,6 +836,7 @@
sep = DocLint.SEPARATOR;
}
doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags.toString());
+ doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + htmlVersion);
JavacTask t = BasicJavacTask.instance(context);
doclint = new DocLint();
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/RootDocImpl.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/RootDocImpl.java Mon Apr 13 18:05:23 2015 -0700
@@ -377,8 +377,9 @@
return env.fileManager;
}
- public void initDocLint(Collection<String> opts, Collection<String> customTagNames) {
- env.initDoclint(opts, customTagNames);
+ public void initDocLint(Collection<String> opts, Collection<String> customTagNames,
+ String htmlVersion) {
+ env.initDoclint(opts, customTagNames, htmlVersion);
}
public boolean isFunctionalInterface(AnnotationDesc annotationDesc) {
--- a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -49,14 +49,14 @@
checkOutput("p1/C1.html", true,
// Top navbar <a href>
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
- // Top navbar <a name>
- "<a name=\"skip.navbar.top\">\n"
+ // Top navbar <a id>
+ "<a id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a>",
// Bottom navbar <a href>
"<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
- // Bottom navbar <a name>
- "<a name=\"skip.navbar.bottom\">\n"
+ // Bottom navbar <a id>
+ "<a id=\"skip.navbar.bottom\">\n"
+ "<!-- -->\n"
+ "</a>");
--- a/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -53,15 +53,15 @@
// Test some section markers and links to these markers
checkOutput("pkg1/RegClass.html", true,
- "<a name=\"skip.navbar.top\">",
+ "<a id=\"skip.navbar.top\">",
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">",
- "<a name=\"nested.class.summary\">",
+ "<a id=\"nested.class.summary\">",
"<a href=\"#nested.class.summary\">",
- "<a name=\"method.summary\">",
+ "<a id=\"method.summary\">",
"<a href=\"#method.summary\">",
- "<a name=\"field.detail\">",
+ "<a id=\"field.detail\">",
"<a href=\"#field.detail\">",
- "<a name=\"constructor.detail\">",
+ "<a id=\"constructor.detail\">",
"<a href=\"#constructor.detail\">");
// Test some members and link to these members
@@ -72,59 +72,59 @@
// Test some fields
checkOutput("pkg1/RegClass.html", true,
- "<a name=\"Z:Z_\">",
+ "<a id=\"Z:Z_\">",
"<a href=\"../pkg1/RegClass.html#Z:Z_\">",
- "<a name=\"Z:Z_:D\">",
+ "<a id=\"Z:Z_:D\">",
"<a href=\"../pkg1/RegClass.html#Z:Z_:D\">",
- "<a name=\"Z:Z:D_\">",
+ "<a id=\"Z:Z:D_\">",
"<a href=\"../pkg1/RegClass.html#Z:Z:D_\">",
- "<a name=\"Z:Z:Dfield\">",
+ "<a id=\"Z:Z:Dfield\">",
"<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">",
- "<a name=\"fieldInCla:D:D\">",
+ "<a id=\"fieldInCla:D:D\">",
"<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">",
- "<a name=\"S_:D:D:D:D:DINT\">",
+ "<a id=\"S_:D:D:D:D:DINT\">",
"<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">",
- "<a name=\"method:D:D\">",
+ "<a id=\"method:D:D\">",
"<a href=\"../pkg1/RegClass.html#method:D:D\">");
checkOutput("pkg1/DeprMemClass.html", true,
- "<a name=\"Z:Z_field_In_Class\">",
+ "<a id=\"Z:Z_field_In_Class\">",
"<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">");
// Test constructor
checkOutput("pkg1/RegClass.html", true,
- "<a name=\"RegClass-java.lang.String-int-\">",
+ "<a id=\"RegClass-java.lang.String-int-\">",
"<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">");
// Test some methods
checkOutput("pkg1/RegClass.html", true,
- "<a name=\"Z:Z_methodInClass-java.lang.String-\">",
+ "<a id=\"Z:Z_methodInClass-java.lang.String-\">",
"<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">",
- "<a name=\"method--\">",
+ "<a id=\"method--\">",
"<a href=\"../pkg1/RegClass.html#method--\">",
- "<a name=\"foo-java.util.Map-\">",
+ "<a id=\"foo-java.util.Map-\">",
"<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">",
- "<a name=\"methodInCla:Ds-java.lang.String:A-\">",
+ "<a id=\"methodInCla:Ds-java.lang.String:A-\">",
"<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">",
- "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
+ "<a id=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
"<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">",
- "<a name=\"methodD-pkg1.RegClass.:DA-\">",
+ "<a id=\"methodD-pkg1.RegClass.:DA-\">",
"<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">",
- "<a name=\"methodD-pkg1.RegClass.D:A-\">",
+ "<a id=\"methodD-pkg1.RegClass.D:A-\">",
"<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">");
checkOutput("pkg1/DeprMemClass.html", true,
- "<a name=\"Z:Z:Dmethod_In_Class--\">",
+ "<a id=\"Z:Z:Dmethod_In_Class--\">",
"<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
// Test enum
checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
- "<a name=\"Z:Z:DFLD2\">",
+ "<a id=\"Z:Z:DFLD2\">",
"<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">");
// Test nested class
checkOutput("pkg1/RegClass._NestedClas$.html", true,
- "<a name=\"Z:Z_NestedClas:D--\">",
+ "<a id=\"Z:Z_NestedClas:D--\">",
"<a href=\"../pkg1/RegClass._NestedClas$.html#Z:Z_NestedClas:D--\">");
// Test class use page
@@ -143,11 +143,11 @@
// Test serialized form page
checkOutput("serialized-form.html", true,
//This is the marker for the link that appears in the pkg1.RegClass.html page
- "<a name=\"pkg1.RegClass\">");
+ "<a id=\"pkg1.RegClass\">");
// Test member name index page
checkOutput("index-all.html", true,
- "<a name=\"I:Z:Z:D\">",
+ "<a id=\"I:Z:Z:D\">",
"<a href=\"#I:Z:Z:D\">$",
"<a href=\"#I:Z:Z_\">_");
--- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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
@@ -47,6 +47,6 @@
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
- "<a name=\"annotation.type.element.detail\">");
+ "<a id=\"annotation.type.element.detail\">");
}
}
--- a/langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, 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
@@ -50,22 +50,22 @@
checkOutput("pkg/package-tree.html", true,
"<ul>\n"
- + "<li type=\"circle\">pkg.<a href=\"../pkg/ParentClass.html\" "
+ + "<li class=\"circle\">pkg.<a href=\"../pkg/ParentClass.html\" "
+ "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a>",
"<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n"
+ "<ul>\n"
- + "<li type=\"circle\">pkg.<a href=\"../pkg/AnnotationType.html\" "
+ + "<li class=\"circle\">pkg.<a href=\"../pkg/AnnotationType.html\" "
+ "title=\"annotation in pkg\"><span class=\"typeNameLink\">AnnotationType</span></a> "
+ "(implements java.lang.annotation.Annotation)</li>\n"
+ "</ul>",
"<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n"
+ "<ul>\n"
- + "<li type=\"circle\">java.lang.Object\n"
+ + "<li class=\"circle\">java.lang.Object\n"
+ "<ul>\n"
- + "<li type=\"circle\">java.lang.Enum<E> (implements java.lang."
+ + "<li class=\"circle\">java.lang.Enum<E> (implements java.lang."
+ "Comparable<T>, java.io.Serializable)\n"
+ "<ul>\n"
- + "<li type=\"circle\">pkg.<a href=\"../pkg/Coin.html\" "
+ + "<li class=\"circle\">pkg.<a href=\"../pkg/Coin.html\" "
+ "title=\"enum in pkg\"><span class=\"typeNameLink\">Coin</span></a></li>\n"
+ "</ul>\n"
+ "</li>\n"
@@ -74,7 +74,7 @@
+ "</ul>");
checkOutput("pkg/package-tree.html", false,
- "<li type=\"circle\">class pkg.<a href=\"../pkg/ParentClass.html\" "
+ "<li class=\"circle\">class pkg.<a href=\"../pkg/ParentClass.html\" "
+ "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a></li>");
}
}
--- a/langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -58,21 +58,21 @@
+ "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
+ "NestedInner(int)</code></a>",
"<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()",
- "<a name=\"Outer--\">",
+ "<a id=\"Outer--\">",
"<a href=\"../pkg1/Outer.html#Outer-int-\">Outer</a></span>(int i)",
- "<a name=\"Outer-int-\">");
+ "<a id=\"Outer-int-\">");
checkOutput("pkg1/Outer.Inner.html", true,
"<a href=\"../pkg1/Outer.Inner.html#Inner--\">Inner</a></span>()",
- "<a name=\"Inner--\">",
+ "<a id=\"Inner--\">",
"<a href=\"../pkg1/Outer.Inner.html#Inner-int-\">Inner</a></span>(int i)",
- "<a name=\"Inner-int-\">");
+ "<a id=\"Inner-int-\">");
checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
"<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\">NestedInner</a></span>()",
- "<a name=\"NestedInner--\">",
+ "<a id=\"NestedInner--\">",
"<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\">NestedInner</a></span>(int i)",
- "<a name=\"NestedInner-int-\">");
+ "<a id=\"NestedInner-int-\">");
checkOutput("pkg1/Outer.Inner.html", false,
"Outer.Inner--",
--- a/langtools/test/com/sun/javadoc/testHref/TestHref.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testHref/TestHref.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -53,11 +53,11 @@
//Member summary table link.
"href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"",
//Anchor test.
- "<a name=\"method-int-int-java.util.ArrayList-\">\n"
+ "<a id=\"method-int-int-java.util.ArrayList-\">\n"
+ "<!-- -->\n"
+ "</a>",
//Backward compatibility anchor test."pkg/C1.html",
- "<a name=\"method-int-int-java.util.ArrayList-\">\n"
+ "<a id=\"method-int-int-java.util.ArrayList-\">\n"
+ "<!-- -->\n"
+ "</a>");
--- a/langtools/test/com/sun/javadoc/testHtmlDocument/TestHtmlDocument.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlDocument/TestHtmlDocument.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -113,7 +113,7 @@
// Test another version of A tag.
HtmlTree anchor = new HtmlTree(HtmlTag.A);
anchor.addAttr(HtmlAttr.HREF, "testLink.html");
- anchor.addAttr(HtmlAttr.NAME, "Another version of a tag");
+ anchor.addAttr(HtmlAttr.ID, "Another version of a tag");
p1.addContent(anchor);
body.addContent(p1);
// Test for empty tags.
--- a/langtools/test/com/sun/javadoc/testHtmlDocument/testMarkup.html Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlDocument/testMarkup.html Mon Apr 13 18:05:23 2015 -0700
@@ -9,7 +9,7 @@
<body>
<!-- ======== START OF PARAGRAPH ======== -->
<p>This document is generated from sample source code and HTML files with examples of a wide variety of Java language constructs: packages, subclasses, subinterfaces, nested classes, nested interfaces,inheriting from other packages, constructors, fields,methods, and so forth. <a href="testLink.html">Click Here</a> to <test> out a link.</p>
-<p><a href="testLink.html" name="Another version of a tag"></a></p>
+<p><a href="testLink.html" id="Another version of a tag"></a></p>
<dl>
<dd>Test DD</dd>
</dl>
--- a/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -48,37 +48,30 @@
checkOutput("pkg1/TestTable.html", true,
"<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Field Summary table, listing fields, "
+ "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, "
+ "and an explanation\">",
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Constructor Summary table, listing "
+ "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing "
+ "constructors, and an explanation\">",
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Method Summary table, listing methods, "
+ "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, "
+ "and an explanation\">");
checkOutput("pkg1/package-summary.html", true,
- "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Class Summary table, listing classes, "
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, "
+ "and an explanation\">");
checkOutput("pkg1/class-use/TestTable.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
checkOutput("overview-summary.html", true,
- "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">");
+ "<table class=\"overviewSummary\" "
+ + "summary=\"Packages table, listing packages, and an explanation\">");
checkOutput("deprecated-list.html", true,
- "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " +
- "cellspacing=\"0\" summary=\"Deprecated Methods table, listing " +
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing " +
"deprecated methods, and an explanation\">");
checkOutput("constant-values.html", true,
- "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " +
- "cellspacing=\"0\" summary=\"Constant Field Values table, listing " +
+ "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing " +
"constant fields, and values\">");
}
}
--- a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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
@@ -63,111 +63,85 @@
void checkHtmlTableSummaries() {
//Package summary
checkOutput("pkg1/package-summary.html", true,
- "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
- + " cellspacing=\"0\" summary=\"Class Summary table, "
+ "<table class=\"typeSummary\" summary=\"Class Summary table, "
+ "listing classes, and an explanation\">",
- "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
- + " cellspacing=\"0\" summary=\"Interface Summary table, "
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, "
+ "listing interfaces, and an explanation\">");
checkOutput("pkg2/package-summary.html", true,
- "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
- + " cellspacing=\"0\" summary=\"Enum Summary table, "
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, "
+ "listing enums, and an explanation\">",
- "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
- + " cellspacing=\"0\" summary=\"Annotation Types Summary table, "
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, "
+ "listing annotation types, and an explanation\">");
// Class documentation
checkOutput("pkg1/C1.html", true,
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Field Summary table, listing fields, "
+ "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, "
+ "and an explanation\">",
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Method Summary table, listing methods, "
+ "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, "
+ "and an explanation\">");
checkOutput("pkg2/C2.html", true,
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Nested Class Summary table, listing "
+ "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing "
+ "nested classes, and an explanation\">",
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Constructor Summary table, listing "
+ "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing "
+ "constructors, and an explanation\">");
checkOutput("pkg2/C2.ModalExclusionType.html", true,
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Enum Constant Summary table, listing "
+ "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing "
+ "enum constants, and an explanation\">");
checkOutput("pkg2/C3.html", true,
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Required Element Summary table, "
+ "<table class=\"memberSummary\" summary=\"Required Element Summary table, "
+ "listing required elements, and an explanation\">");
checkOutput("pkg2/C4.html", true,
- "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Optional Element Summary table, "
+ "<table class=\"memberSummary\" summary=\"Optional Element Summary table, "
+ "listing optional elements, and an explanation\">");
// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing packages, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
checkOutput("pkg1/class-use/C1.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing fields, and an explanation\">",
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing methods, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">",
+ "<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
checkOutput("pkg2/class-use/C2.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing fields, and an explanation\">",
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing methods, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">",
+ "<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing packages, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing methods, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
// Package use documentation
checkOutput("pkg1/package-use.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing packages, and an explanation\">",
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing classes, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+ "<table class=\"useSummary\" summary=\"Use table, listing classes, and an explanation\">");
checkOutput("pkg2/package-use.html", true,
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing packages, and an explanation\">",
- "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
- + "table, listing classes, and an explanation\">");
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+ "<table class=\"useSummary\" summary=\"Use table, listing classes, and an explanation\">");
// Deprecated
checkOutput("deprecated-list.html", true,
- "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
- + "summary=\"Deprecated Fields table, listing deprecated fields, "
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, "
+ "and an explanation\">",
- "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
- + "summary=\"Deprecated Methods table, listing deprecated methods, "
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, "
+ "and an explanation\">");
// Constant values
checkOutput("constant-values.html", true,
- "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
- + "summary=\"Constant Field Values table, listing "
+ "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing "
+ "constant fields, and values\">");
// Overview Summary
checkOutput("overview-summary.html", true,
- "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Packages table, "
- + "listing packages, and an explanation\">");
+ "<table class=\"overviewSummary\" "
+ + "summary=\"Packages table, listing packages, and an explanation\">");
}
/*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,2158 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8072945
+ * @summary Test the version of HTML generated by the javadoc tool.
+ * @author bpatel
+ * @library ../lib
+ * @build JavadocTester
+ * @run main TestHtmlVersion
+ */
+
+public class TestHtmlVersion extends JavadocTester {
+
+ public static void main(String... args) throws Exception {
+ TestHtmlVersion tester = new TestHtmlVersion();
+ tester.runTests();
+ }
+
+ @Test
+ void test1() {
+ javadoc("-d", "out-1", "-private", "-linksource", "-html5",
+ "-Xprofilespath", testSrc("profile-rtjar-includes.txt"),
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkExit(Exit.OK);
+
+ html5Output();
+ html5NegatedOutput();
+ }
+
+ @Test
+ void test2() {
+ javadoc("-d", "out-2", "-private", "-linksource", "-html4",
+ "-Xprofilespath", testSrc("profile-rtjar-includes.txt"),
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkExit(Exit.OK);
+
+ html4Output();
+ html4NegatedOutput();
+ }
+
+ @Test
+ void test3() {
+ javadoc("-d", "out-3", "-private", "-linksource",
+ "-Xprofilespath", testSrc("profile-rtjar-includes.txt"),
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkExit(Exit.OK);
+
+ html4Output();
+ html4NegatedOutput();
+ }
+
+ @Test
+ void test4() {
+ javadoc("-d", "out-4", "-private", "-linksource", "-html5",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg3");
+ checkExit(Exit.OK);
+ }
+
+ void html5Output() {
+ // Test for overview-frame page
+ checkOutput("overview-frame.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<nav role=\"navigation\" class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<h2 title=\"Packages\">Packages</h2>");
+
+ // Test for allclasses-frame page
+ checkOutput("allclasses-frame.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Test for allclasses-noframe page
+ checkOutput("allclasses-noframe.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Test for profile-overview-frame page
+ checkOutput("profile-overview-frame.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<nav role=\"navigation\" class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<h2 title=\"Profiles\">Profiles</h2>");
+
+ // Test for <profile-name>-frame page
+ checkOutput("compact1-frame.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<nav role=\"navigation\" class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<h2 title=\"compact1\"><a href=\"compact1-summary.html\" target=\"classFrame\">compact1</a> Packages</h2>");
+
+ // Test for overview-summary page
+ checkOutput("overview-summary.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"overviewSummary\">\n"
+ + "<caption>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div>\n"
+ + "<h2>Profiles</h2>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for package-frame page
+ checkOutput("pkg/package-frame.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\">\n"
+ + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interfaces\">Interfaces</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Classes\">Classes</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enums\">Enums</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Exceptions\">Exceptions</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Errors\">Errors</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Types\">Annotation Types</h2>");
+
+ // Test for package-summary page
+ checkOutput("pkg/package-summary.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Package pkg Description\">Package pkg Description</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for package-tree page
+ checkOutput("pkg/package-tree.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<li class=\"circle\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for package-use page
+ checkOutput("pkg1/package-use.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"useSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for <profile-name>-package-frame page
+ checkOutput("pkg/compact1-package-frame.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\">\n"
+ + "<h1 class=\"bar\"><a href=\"../compact1-summary.html\" target=\"classFrame\">"
+ + "compact1</a> - <a href=\"../pkg/compact1-package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interfaces\">Interfaces</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Classes\">Classes</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enums\">Enums</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Exceptions\">Exceptions</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Errors\">Errors</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Types\">Annotation Types</h2>");
+
+ // Test for <profile-name>-package-summary page
+ checkOutput("pkg/compact1-package-summary.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Package pkg Description\">Package pkg Description</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for <profile-name>-summary page
+ checkOutput("compact1-summary.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<section role=\"region\">\n"
+ + "<h3><a href=\"pkg/compact1-package-summary.html\" target=\"classFrame\">pkg</a></h3>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for constant-values page
+ checkOutput("constant-values.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"constantsSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Contents\">Contents</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"pkg\">pkg.*</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for deprecated-list page
+ checkOutput("deprecated-list.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"deprecatedSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for serialized-form page
+ checkOutput("serialized-form.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Package\">Package pkg</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for overview-tree page
+ checkOutput("overview-tree.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<li class=\"circle\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for index-all page
+ checkOutput("index-all.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "</header>\n"
+ + "<main role=\"main\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for src-html page
+ checkOutput("src-html/pkg/AnotherClass.html", true,
+ "<!DOCTYPE HTML>",
+ "<main role=\"main\">\n"
+ + "<div class=\"sourceContainer\">");
+
+ // Test for help-doc page
+ checkOutput("help-doc.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2>Overview</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2>Package</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2>Class/Interface</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for a regular class page and members (nested class, field, constructore and method)
+ checkOutput("pkg/AnotherClass.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Nested Class Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"field.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"field.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Detail</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for enum page
+ checkOutput("pkg/AnotherClass.ModalExclusionType.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Detail</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for interface page
+ checkOutput("pkg2/Interface.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for error page
+ checkOutput("pkg/TestError.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for exception page
+ checkOutput("pkg/TestException.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for annotation page
+ checkOutput("pkg2/TestAnnotationType.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Required Element Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Optional Element Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Element Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for class use page
+ checkOutput("pkg1/class-use/RegClass.html", true,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<table class=\"useSummary\">",
+ "<section role=\"region\"><a id=\"pkg\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+ + "<table class=\"useSummary\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Test for main index page
+ checkOutput("index.html", true,
+ "<!DOCTYPE HTML>",
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">",
+ "<body>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"mainContainer\">\n"
+ + "<div class=\"leftContainer\">\n"
+ + "<div class=\"leftTop\">\n"
+ + "<iframe src=\"overview-frame.html\" name=\"packageListFrame\" title=\"All Packages\"></iframe>\n"
+ + "</div>");
+ }
+
+ void html5NegatedOutput() {
+ // Negated test for overview-frame page
+ checkOutput("overview-frame.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<div class=\"indexContainer\">\n"
+ + "<h2 title=\"Packages\">Packages</h2>");
+
+ // Negated test for allclasses-frame page
+ checkOutput("allclasses-frame.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Negated test for allclasses-noframe page
+ checkOutput("allclasses-noframe.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Negated test for profile-overview-frame page
+ checkOutput("profile-overview-frame.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<div class=\"indexContainer\">\n"
+ + "<h2 title=\"Profiles\">Profiles</h2>");
+
+ // Negated test for <profile-name>-frame page
+ checkOutput("compact1-frame.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<div class=\"indexContainer\">\n"
+ + "<h2 title=\"compact1\"><a href=\"compact1-summary.html\" target=\"classFrame\">compact1</a> Packages</h2>");
+
+ // Negated test for overview-summary page
+ checkOutput("overview-summary.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ + "<caption>",
+ "</noscript>\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div>\n"
+ + "<h2>Profiles</h2>");
+
+ // Negated test for package-frame page
+ checkOutput("pkg/package-frame.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<body>\n"
+ + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+
+ // Negated test for package-summary page
+ checkOutput("pkg/package-summary.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+ // Negated test for package-tree page
+ checkOutput("pkg/package-tree.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+
+ // Negated test for package-use page
+ checkOutput("pkg1/package-use.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
+
+ // Negated test for <profile-name>-package-frame page
+ checkOutput("pkg/compact1-package-frame.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<body>\n"
+ + "<h1 class=\"bar\"><a href=\"../compact1-summary.html\" target=\"classFrame\">"
+ + "compact1</a> - <a href=\"../pkg/compact1-package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+
+ // Negated test for <profile-name>-package-summary page
+ checkOutput("pkg/compact1-package-summary.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+ // Negated test for <profile-name>-summary page
+ checkOutput("compact1-summary.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+ // Negated test for constant-values page
+ checkOutput("constant-values.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
+
+ // Negated test for deprecated-list page
+ checkOutput("deprecated-list.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">\n"
+ + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
+ + "<h2 title=\"Contents\">Contents</h2>",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Exceptions table, listing deprecated exceptions, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Errors table, listing deprecated errors, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Types table, listing deprecated annotation types, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Constructors table, listing deprecated constructors, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Enum Constants table, listing deprecated enum constants, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Type Elements table, listing deprecated annotation type elements, and an explanation\">");
+
+ // Negated test for serialized-form page
+ checkOutput("serialized-form.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<li class=\"blockList\">\n"
+ + "<h2 title=\"Package\">Package pkg</h2>");
+
+ // Negated test for overview-tree page
+ checkOutput("overview-tree.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<div class=\"contentContainer\">\n"
+ + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+ "</ul>\n"
+ + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+ "</ul>\n"
+ + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>");
+
+ // Negated test for index-all page
+ checkOutput("index-all.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"contentContainer\">");
+
+ // Negated test for src-html page
+ checkOutput("src-html/pkg/AnotherClass.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<body>\n"
+ + "<div class=\"sourceContainer\">");
+
+ // Negated test for help-doc page
+ checkOutput("help-doc.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<h2>Overview</h2>",
+ "<li class=\"blockList\">\n"
+ + "<h2>Package</h2>",
+ "<li class=\"blockList\">\n"
+ + "<h2>Class/Interface</h2>");
+
+ // Negated test for a regular class page and members (nested class, field, constructore and method)
+ checkOutput("pkg/AnotherClass.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ======== NESTED CLASS SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Nested Class Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing nested classes, and an explanation\">",
+ "<!-- =========== FIELD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"field.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, and an explanation\">",
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing constructors, and an explanation\">",
+ "<!-- ========== METHOD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+ "<!-- ============ FIELD DETAIL =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"field.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Detail</h3>",
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<!-- ============ METHOD DETAIL ========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>");
+
+ // Negated test for enum page
+ checkOutput("pkg/AnotherClass.ModalExclusionType.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- =========== ENUM CONSTANT SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing enum constants, and an explanation\">",
+ "<!-- ========== METHOD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+ "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Detail</h3>",
+ "<!-- ============ METHOD DETAIL ========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>");
+
+ // Negated test for interface page
+ checkOutput("pkg2/Interface.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ========== METHOD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+ "<!-- ============ METHOD DETAIL ========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>");
+
+ // Negated test for error page
+ checkOutput("pkg/TestError.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>");
+
+ // Negated test for exception page
+ checkOutput("pkg/TestException.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>");
+
+ // Negated test for annotation page
+ checkOutput("pkg2/TestAnnotationType.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Required Element Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Required Element Summary table, listing required elements, and an explanation\">",
+ "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Optional Element Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Optional Element Summary table, listing optional elements, and an explanation\">",
+ "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Element Detail</h3>");
+
+ // Negated test for class use page
+ checkOutput("pkg1/class-use/RegClass.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+ "<li class=\"blockList\"><a name=\"pkg\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+ + "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
+
+ // Negated test for main index page
+ checkOutput("index.html", false,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<body>\n"
+ + "<div class=\"mainContainer\">\n");
+ }
+
+ void html4Output() {
+ // Test for overview-frame page
+ checkOutput("overview-frame.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<div class=\"indexContainer\">\n"
+ + "<h2 title=\"Packages\">Packages</h2>");
+
+ // Test for allclasses-frame page
+ checkOutput("allclasses-frame.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Test for allclasses-noframe page
+ checkOutput("allclasses-noframe.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Test for profile-overview-frame page
+ checkOutput("profile-overview-frame.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<div class=\"indexContainer\">\n"
+ + "<h2 title=\"Profiles\">Profiles</h2>");
+
+ // Test for <profile-name>-frame page
+ checkOutput("compact1-frame.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<div class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<div class=\"indexContainer\">\n"
+ + "<h2 title=\"compact1\"><a href=\"compact1-summary.html\" target=\"classFrame\">compact1</a> Packages</h2>");
+
+ // Test for overview-summary page
+ checkOutput("overview-summary.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ + "<caption>",
+ "</noscript>\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<div class=\"contentContainer\">\n"
+ + "<div>\n"
+ + "<h2>Profiles</h2>");
+
+ // Test for package-frame page
+ checkOutput("pkg/package-frame.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<body>\n"
+ + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+
+ // Test for package-summary page
+ checkOutput("pkg/package-summary.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+ // Test for package-tree page
+ checkOutput("pkg/package-tree.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<li class=\"circle\">");
+
+ // Test for package-use page
+ checkOutput("pkg1/package-use.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
+
+ // Test for <profile-name>-package-frame page
+ checkOutput("pkg/compact1-package-frame.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<body>\n"
+ + "<h1 class=\"bar\"><a href=\"../compact1-summary.html\" target=\"classFrame\">"
+ + "compact1</a> - <a href=\"../pkg/compact1-package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+
+ // Test for <profile-name>-package-summary page
+ checkOutput("pkg/compact1-package-summary.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+ // Test for <profile-name>-summary page
+ checkOutput("compact1-summary.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+ "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+ // Test for constant-values page
+ checkOutput("constant-values.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
+
+ // Test for deprecated-list page
+ checkOutput("deprecated-list.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">\n"
+ + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
+ + "<h2 title=\"Contents\">Contents</h2>",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Exceptions table, listing deprecated exceptions, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Errors table, listing deprecated errors, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Types table, listing deprecated annotation types, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Constructors table, listing deprecated constructors, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Enum Constants table, listing deprecated enum constants, and an explanation\">",
+ "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Type Elements table, listing deprecated annotation type elements, and an explanation\">");
+
+ // Test for serialized-form page
+ checkOutput("serialized-form.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<li class=\"blockList\">\n"
+ + "<h2 title=\"Package\">Package pkg</h2>");
+
+ // Test for overview-tree page
+ checkOutput("overview-tree.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<li class=\"circle\">",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<h1 class=\"title\">Hierarchy For All Packages</h1>\n"
+ + "<span class=\"packageHierarchyLabel\">Package Hierarchies:</span>",
+ "<div class=\"contentContainer\">\n"
+ + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+ "</ul>\n"
+ + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+ "</ul>\n"
+ + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>");
+
+ // Test for index-all page
+ checkOutput("index-all.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"contentContainer\">");
+
+ // Test for src-html page
+ checkOutput("src-html/pkg/AnotherClass.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<body>\n"
+ + "<div class=\"sourceContainer\">");
+
+ // Test for help-doc page
+ checkOutput("help-doc.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<h2>Overview</h2>",
+ "<li class=\"blockList\">\n"
+ + "<h2>Package</h2>",
+ "<li class=\"blockList\">\n"
+ + "<h2>Class/Interface</h2>");
+
+ // Test for a regular class page and members (nested class, field, constructore and method)
+ checkOutput("pkg/AnotherClass.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ======== NESTED CLASS SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Nested Class Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing nested classes, and an explanation\">",
+ "<!-- =========== FIELD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"field.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, and an explanation\">",
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing constructors, and an explanation\">",
+ "<!-- ========== METHOD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+ "<!-- ============ FIELD DETAIL =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"field.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Detail</h3>",
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<!-- ============ METHOD DETAIL ========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>");
+
+ // Test for enum page
+ checkOutput("pkg/AnotherClass.ModalExclusionType.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- =========== ENUM CONSTANT SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing enum constants, and an explanation\">",
+ "<!-- ========== METHOD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+ "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Detail</h3>",
+ "<!-- ============ METHOD DETAIL ========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>");
+
+ // Test for interface page
+ checkOutput("pkg2/Interface.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ========== METHOD SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+ "<!-- ============ METHOD DETAIL ========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>");
+
+ // Test for error page
+ checkOutput("pkg/TestError.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>");
+
+ // Test for exception page
+ checkOutput("pkg/TestException.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>");
+
+ // Test for annotation page
+ checkOutput("pkg2/TestAnnotationType.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ======== START OF CLASS DATA ======== -->\n"
+ + "<div class=\"header\">",
+ "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Required Element Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Required Element Summary table, listing required elements, and an explanation\">",
+ "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Optional Element Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Optional Element Summary table, listing optional elements, and an explanation\">",
+ "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Element Detail</h3>");
+
+ // Test for class use page
+ checkOutput("pkg1/class-use/RegClass.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<meta name=\"date\"",
+ "<a id=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "<div class=\"header\">",
+ "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+ "<li class=\"blockList\"><a id=\"pkg\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+ + "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
+
+ // Test for main index page
+ checkOutput("index.html", true,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">",
+ "<body>\n"
+ + "<div class=\"mainContainer\">\n"
+ + "<div class=\"leftContainer\">\n"
+ + "<div class=\"leftTop\">\n"
+ + "<iframe src=\"overview-frame.html\" name=\"packageListFrame\" title=\"All Packages\"></iframe>\n"
+ + "</div>");
+ }
+
+ void html4NegatedOutput() {
+ // Negated test for overview-frame page
+ checkOutput("overview-frame.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<nav role=\"navigation\" class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<h2 title=\"Packages\">Packages</h2>");
+
+ // Negated test for allclasses-frame page
+ checkOutput("allclasses-frame.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Negated test for allclasses-noframe page
+ checkOutput("allclasses-noframe.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<ul>\n"
+ + "<li>");
+
+ // Negated test for profile-overview-frame page
+ checkOutput("profile-overview-frame.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<nav role=\"navigation\" class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<h2 title=\"Profiles\">Profiles</h2>");
+
+ // Negated test for <profile-name>-frame page
+ checkOutput("compact1-frame.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<nav role=\"navigation\" class=\"indexNav\">\n"
+ + "<ul>\n"
+ + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All Classes</a></li>",
+ "<main role=\"main\" class=\"indexContainer\">\n"
+ + "<h2 title=\"compact1\"><a href=\"compact1-summary.html\" target=\"classFrame\">compact1</a> Packages</h2>");
+
+ // Negated test for overview-summary page
+ checkOutput("overview-summary.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"overviewSummary\">\n"
+ + "<caption>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div>\n"
+ + "<h2>Profiles</h2>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for package-frame page
+ checkOutput("pkg/package-frame.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\">\n"
+ + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interfaces\">Interfaces</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Classes\">Classes</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enums\">Enums</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Exceptions\">Exceptions</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Errors\">Errors</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Types\">Annotation Types</h2>");
+
+ // Negated test for package-summary page
+ checkOutput("pkg/package-summary.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Package pkg Description\">Package pkg Description</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for package-tree page
+ checkOutput("pkg/package-tree.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for package-use page
+ checkOutput("pkg1/package-use.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"useSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for <profile-name>-package-frame page
+ checkOutput("pkg/compact1-package-frame.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<main role=\"main\">\n"
+ + "<h1 class=\"bar\"><a href=\"../compact1-summary.html\" target=\"classFrame\">"
+ + "compact1</a> - <a href=\"../pkg/compact1-package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interfaces\">Interfaces</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Classes\">Classes</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enums\">Enums</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Exceptions\">Exceptions</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Errors\">Errors</h2>",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Types\">Annotation Types</h2>");
+
+ // Negated test for <profile-name>-package-summary page
+ checkOutput("pkg/compact1-package-summary.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Package pkg Description\">Package pkg Description</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for <profile-name>-summary page
+ checkOutput("compact1-summary.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"typeSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<section role=\"region\">\n"
+ + "<h3><a href=\"pkg/compact1-package-summary.html\" target=\"classFrame\">pkg</a></h3>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for constant-values page
+ checkOutput("constant-values.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"constantsSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Contents\">Contents</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"pkg\">pkg.*</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for deprecated-list page
+ checkOutput("deprecated-list.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<table class=\"deprecatedSummary\">",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for serialized-form page
+ checkOutput("serialized-form.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Package\">Package pkg</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for overview-tree page
+ checkOutput("overview-tree.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for index-all page
+ checkOutput("index-all.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "</header>\n"
+ + "<main role=\"main\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for src-html page
+ checkOutput("src-html/pkg/AnotherClass.html", false,
+ "<!DOCTYPE HTML>",
+ "<main role=\"main\">\n"
+ + "<div class=\"sourceContainer\">");
+
+ // Negated test for help-doc page
+ checkOutput("help-doc.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<h2>Overview</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2>Package</h2>\n",
+ "<section role=\"region\">\n"
+ + "<h2>Class/Interface</h2>\n",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for a regular class page and members (nested class, field, constructore and method)
+ checkOutput("pkg/AnotherClass.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Nested Class Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"field.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"field.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Field Detail</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for enum page
+ checkOutput("pkg/AnotherClass.ModalExclusionType.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Enum Constant Detail</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for interface page
+ checkOutput("pkg2/Interface.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Method Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for error page
+ checkOutput("pkg/TestError.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for exception page
+ checkOutput("pkg/TestException.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Summary</h3>",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Constructor Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for annotation page
+ checkOutput("pkg2/TestAnnotationType.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Required Element Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Optional Element Summary</h3>\n"
+ + "<table class=\"memberSummary\">",
+ "<section role=\"region\">\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Element Detail</h3>",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for class use page
+ checkOutput("pkg1/class-use/RegClass.html", false,
+ "<!DOCTYPE HTML>",
+ "<meta name=\"dc.created\"",
+ "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<header role=\"banner\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ========= START OF TOP NAVBAR ======= -->",
+ "<main role=\"main\">\n"
+ + "<div class=\"header\">",
+ "<table class=\"useSummary\">",
+ "<section role=\"region\"><a name=\"pkg\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+ + "\n"
+ + "<table class=\"useSummary\">",
+ "<footer role=\"contentinfo\">\n"
+ + "<nav role=\"navigation\">\n"
+ + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+ // Negated test for main index page
+ checkOutput("index.html", false,
+ "<!DOCTYPE HTML>",
+ "<body>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"mainContainer\">\n");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg/AnnotationType.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is a test annotation type.
+ *
+ * @author Bhavesh Patel.
+ * @since 9
+ */
+@Documented public @interface AnnotationType {
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg/AnotherClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+import pkg1.*;
+
+/**
+ * Another test class.
+ *
+ * @author Bhavesh Patel
+ */
+public class AnotherClass {
+
+ /**
+ * A test field.
+ */
+ public RegClass field;
+
+ /**
+ * Constant field.
+ */
+ public static final String CONSTANT_FIELD_3 = "constant";
+
+ /**
+ * @deprecated don't use this field anymore.
+ */
+ public RegClass dep_field;
+
+ /**
+ * A sample enum.
+ */
+ public static enum ModalExclusionType {
+ /**
+ * Test comment.
+ */
+ NO_EXCLUDE,
+ /**
+ * Another comment.
+ */
+ APPLICATION_EXCLUDE
+ };
+
+ /**
+ * A string constant.
+ */
+ public static final String CONSTANT1 = "C2";
+
+ /**
+ * A sample method.
+ *
+ * @param param some parameter.
+ * @return a test object.
+ */
+ public Class method(pkg1.RegClass param) {
+ return param;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg/TestError.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * Error class.
+ */
+public class TestError extends Error {
+
+ /**
+ * Constructs a test error.
+ */
+ public TestError() {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg/TestException.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * Thrown when a TestException occurs.
+ */
+public class TestException extends Exception {
+
+ /**
+ * Constructs a {@code TestException} with no detail message.
+ */
+ public TestException() {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg/TestInterface.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * This is a description for an Interface.
+ */
+
+public interface TestInterface {
+
+ public void method();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg/package-info.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test package.
+ */
+package pkg;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg1/NestedInnerClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and the inner class is private
+ * and a nested inner class is protected.
+ *
+ * @author Bhavesh Patel
+ */
+
+class NestedInnerClass {
+
+ private static class InnerClass {
+
+ protected static class ProNestedInnerClass implements java.io.Serializable {
+
+ public final int SERIALIZABLE_CONSTANT2 = 1;
+
+ /**
+ * @param s ObjectInputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void readObject(ObjectInputStream s) throws IOException {
+ }
+
+ /**
+ * @param s ObjectOutputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void writeObject(ObjectOutputStream s) throws IOException {
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg1/PrivateIncludeInnerClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is private which is included using the tag.
+ *
+ * @author Bhavesh Patel
+ */
+
+class PrivateIncludeInnerClass {
+
+ /**
+ * @serial include
+ */
+ private static class PriInnerClass implements java.io.Serializable {
+
+ public final int SERIALIZABLE_CONSTANT = 1;
+
+ /**
+ * @param s ObjectInputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void readObject(ObjectInputStream s) throws IOException {
+ }
+
+ /**
+ * @param s ObjectOutputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void writeObject(ObjectOutputStream s) throws IOException {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg1/ProtectedInnerClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where outer class is package private and the inner class is
+ * protected.
+ *
+ * @author Bhavesh Patel
+ */
+
+class ProtectedInnerClass {
+
+ protected static class ProInnerClass implements java.io.Serializable {
+
+ public final int SERIALIZABLE_CONSTANT1 = 1;
+
+ /**
+ * @param s ObjectInputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void readObject(ObjectInputStream s) throws IOException {
+ }
+
+ /**
+ * @param s ObjectOutputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void writeObject(ObjectOutputStream s) throws IOException {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg1/PublicExcludeInnerClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is public which is excluded using the tag.
+ *
+ * @author Bhavesh Patel
+ */
+
+class PublicExcludeInnerClass {
+
+ /**
+ * @serial exclude
+ */
+ public static class PubInnerClass implements java.io.Serializable {
+
+ public final int SERIALIZABLE_CONSTANT3 = 1;
+
+ /**
+ * @param s ObjectInputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void readObject(ObjectInputStream s) throws IOException {
+ }
+
+ /**
+ * @param s ObjectOutputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void writeObject(ObjectOutputStream s) throws IOException {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg1/RegClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+/**
+ *This is a description for Class.
+ */
+
+public class RegClass {
+
+ /**
+ * Constant field.
+ */
+ public static final String CONSTANT_FIELD_1 = "constant";
+
+ /**
+ * Another constant field.
+ */
+ public static final int CONSTANT_FIELD_2 = 1;
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/DeprecatedClassByAnnotation.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+@Deprecated()
+public class DeprecatedClassByAnnotation {
+
+ @Deprecated()
+ public int field;
+
+ @Deprecated()
+ public DeprecatedClassByAnnotation() {}
+
+ @Deprecated()
+ public void method() {}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/Interface.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * This is a description for an Interface.
+ */
+
+public interface Interface {
+
+ public void method1();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/TestAnnotationType.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+import java.lang.annotation.*;
+
+/**
+ * @deprecated annotation_test1 passes.
+ */
+@Documented public @interface TestAnnotationType {
+
+ /**
+ * @deprecated annotation_test2 passes.
+ */
+ String optional() default "unknown";
+
+ /**
+ * @deprecated annotation_test3 passes.
+ */
+ int required();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/TestClass.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * @deprecated class_test1 passes.
+ */
+public class TestClass {
+
+ /**
+ * @deprecated class_test2 passes.
+ */
+ public int field;
+
+ /**
+ * @deprecated constant field.
+ */
+ public static final int CONSTANT_FIELD = 2;
+
+ /**
+ * @deprecated class_test3 passes.
+ */
+ public TestClass() {}
+
+ /**
+ * @deprecated class_test4 passes.
+ */
+ public void method() {}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/TestEnum.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * @deprecated enum_test1 passes.
+ */
+public enum TestEnum {
+
+ /**
+ * @deprecated enum_test2 passes.
+ */
+ ONE, TWO, THREE;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/TestError.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * @deprecated error_test1 passes.
+ */
+public class TestError extends Error {
+
+ /**
+ * @deprecated error_test2 passes.
+ */
+ public int field;
+
+ /**
+ * @deprecated error_test3 passes.
+ */
+ public TestError() {}
+
+ /**
+ * @deprecated error_test4 passes.
+ */
+ public void method() {}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/TestException.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * @deprecated exception_test1 passes.
+ */
+public class TestException extends Exception {
+
+ /**
+ * @deprecated exception_test2 passes.
+ */
+ public int field;
+
+ /**
+ * @deprecated exception_test3 passes.
+ */
+ public TestException() {}
+
+ /**
+ * @deprecated exception_test4 passes.
+ */
+ public void method() {}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg2/TestInterface.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * @deprecated interface_test1 passes.
+ */
+public class TestInterface {
+
+ /**
+ * @deprecated interface_test2 passes.
+ */
+ public int field;
+
+ /**
+ * @deprecated interface_test3 passes.
+ */
+ public TestInterface() {}
+
+ /**
+ * @deprecated interface_test4 passes.
+ */
+ public void method() {}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/pkg3/ClassNoConstants.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg3;
+
+/**
+ * This is an empty class specifically testing for no Constant value.
+ */
+
+public class ClassNoConstants {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/profile-rtjar-includes.txt Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,30 @@
+PROFILE_1_RTJAR_INCLUDE_PACKAGES := \
+ pkg
+
+PROFILE_1_RTJAR_INCLUDE_TYPES := \
+ pkg1/Class.class
+
+PROFILE_1_RTJAR_EXCLUDE_TYPES :=
+
+PROFILE_1_INCLUDE_METAINF_SERVICES :=
+
+
+PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
+ pkg1
+
+PROFILE_2_RTJAR_INCLUDE_TYPES :=
+
+PROFILE_2_RTJAR_EXCLUDE_TYPES :=
+
+PROFILE_2_INCLUDE_METAINF_SERVICES :=
+
+
+PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
+ pkg2
+
+PROFILE_3_RTJAR_INCLUDE_TYPES :=
+
+PROFILE_3_RTJAR_EXCLUDE_TYPES :=
+
+PROFILE_3_INCLUDE_METAINF_SERVICES :=
+
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -99,11 +99,11 @@
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
- "<li class=\"blockList\"><a name=\"property.detail\">\n"
+ "<li class=\"blockList\"><a id=\"property.detail\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<h3>Property Detail</h3>\n"
- + "<a name=\"betaProperty\">\n"
+ + "<a id=\"betaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
@@ -112,7 +112,7 @@
+ "<pre>public java.lang.Object betaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
- + "<a name=\"gammaProperty\">\n"
+ + "<a id=\"gammaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
@@ -122,7 +122,7 @@
+ "java.lang.String> gammaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
- + "<a name=\"deltaProperty\">\n"
+ + "<a id=\"deltaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockListLast\">\n"
--- a/langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -47,7 +47,7 @@
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
- "<a name=\"pkg.C\">");
+ "<a id=\"pkg.C\">");
checkOutput("pkg/C.html", true,
"<a href=\"../serialized-form.html#pkg.C\">");
}
--- a/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -58,9 +58,9 @@
// Legacy anchor dimensions (6290760)
checkOutput("pkg2/A.html", true,
- "<a name=\"f-java.lang.Object:A-\">\n"
+ "<a id=\"f-java.lang.Object:A-\">\n"
+ "<!-- -->\n"
- + "</a><a name=\"f-T:A-\">\n"
+ + "</a><a id=\"f-T:A-\">\n"
+ "<!-- -->\n"
+ "</a>");
}
--- a/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -63,7 +63,7 @@
"<li>Next Class</li>",
// Test for 4664607
"<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
- + "<a name=\"navbar.top.firstrow\">\n"
+ + "<a id=\"navbar.top.firstrow\">\n"
+ "<!-- -->\n"
+ "</a>");
}
--- a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java Mon Apr 13 18:05:23 2015 -0700
@@ -47,16 +47,16 @@
// Tests for profile-overview-frame.html listing all profiles.
checkOutput("profile-overview-frame.html", true,
- "<span><a href=\"overview-frame.html\" "
- + "target=\"packageListFrame\">All Packages</a></span>",
+ "<li><a href=\"overview-frame.html\" "
+ + "target=\"packageListFrame\">All Packages</a></li>",
"<li><a href=\"compact1-frame.html\" target=\"packageListFrame\">"
+ "compact1</a></li>");
// Tests for profileName-frame.html listing all packages in a profile.
checkOutput("compact2-frame.html", true,
- "<span><a href=\"overview-frame.html\" target=\"packageListFrame\">"
- + "All Packages</a></span><span><a href=\"profile-overview-frame.html\" "
- + "target=\"packageListFrame\">All Profiles</a></span>",
+ "<li><a href=\"overview-frame.html\" target=\"packageListFrame\">"
+ + "All Packages</a></li>\n<li><a href=\"profile-overview-frame.html\" "
+ + "target=\"packageListFrame\">All Profiles</a></li>",
"<li><a href=\"pkg4/compact2-package-frame.html\" "
+ "target=\"packageFrame\">pkg4</a></li>");
@@ -78,15 +78,13 @@
+ "<li class=\"blockList\">\n"
+ "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">"
+ "pkg2</a></h3>\n"
- + "<table class=\"typeSummary\" border=\"0\" "
- + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, "
+ + "<table class=\"typeSummary\" summary=\"Class Summary table, "
+ "listing classes, and an explanation\">",
"<ul class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
+ "<h3><a href=\"pkg4/compact2-package-summary.html\" target=\"classFrame\">"
+ "pkg4</a></h3>\n"
- + "<table class=\"typeSummary\" border=\"0\" "
- + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, "
+ + "<table class=\"typeSummary\" summary=\"Class Summary table, "
+ "listing classes, and an explanation\">");
@@ -98,14 +96,13 @@
"<div class=\"subTitle\">compact3</div>",
"<ul class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
- + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Interface Summary table, listing "
+ + "<table class=\"typeSummary\" summary=\"Interface Summary table, listing "
+ "interfaces, and an explanation\">");
// Test for "overview-frame.html" showing the "All Profiles" link.
checkOutput("overview-frame.html", true,
- "<span><a href=\"profile-overview-frame.html\" "
- + "target=\"packageListFrame\">All Profiles</a></span>");
+ "<li><a href=\"profile-overview-frame.html\" "
+ + "target=\"packageListFrame\">All Profiles</a></li>");
// Test for "className.html" showing the profile information for the type.
checkOutput("pkg2/Class1Pkg2.html", true,
@@ -150,7 +147,6 @@
// Test exception in profiles
checkOutput("compact1-summary.html", true,
"<table class=\"typeSummary\" "
- + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
+ "summary=\"Exception Summary table, listing exceptions, and an explanation\">\n"
+ "<caption><span>Exception Summary</span><span class=\"tabEnd\">"
+ " </span></caption>\n"
@@ -166,8 +162,7 @@
//Test errors in profiles
checkOutput("compact1-summary.html", true,
- "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
- + "summary=\"Error Summary table, listing errors, and an explanation\">\n"
+ "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">\n"
+ "<caption><span>Error Summary</span><span class=\"tabEnd\"> "
+ "</span></caption>\n"
+ "<tr>\n"
@@ -199,16 +194,14 @@
+ "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">"
+ "pkg2</a></h3>\n" +
"<li class=\"blockList\">\n"
- + "<table class=\"typeSummary\" border=\"0\" "
- + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, "
+ + "<table class=\"typeSummary\" summary=\"Class Summary table, "
+ "listing classes, and an explanation\">");
checkOutput("pkg5/compact3-package-summary.html", false,
"<ul class=\"blockList\">\n" +
"<li class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
- + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" "
- + "cellspacing=\"0\" summary=\"Interface Summary table, listing "
+ + "<table class=\"typeSummary\" summary=\"Interface Summary table, listing "
+ "interfaces, and an explanation\">");
}
--- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -67,7 +67,7 @@
// Nested type parameters
checkOutput("pkg/C.html", true,
- "<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">\n"
+ "<a id=\"formatDetails-java.util.Collection-java.util.Collection-\">\n"
+ "<!-- -->\n"
+ "</a>");
}
--- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Mon Apr 13 18:05:23 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -135,7 +135,7 @@
+ "UsedInC</a> in <a href=\"../package-summary.html\"><Unnamed></a>"
);
checkOutput("class-use/UsedInC.html", true,
- "<li class=\"blockList\"><a name=\"unnamed.package\">"
+ "<li class=\"blockList\"><a id=\"unnamed.package\">"
);
checkOutput("package-use.html", true,
"<td class=\"colOne\">"
--- a/langtools/test/tools/doclint/DocLintTester.java Wed Jul 05 20:28:21 2017 +0200
+++ b/langtools/test/tools/doclint/DocLintTester.java Mon Apr 13 18:05:23 2015 -0700
@@ -21,21 +21,20 @@
* questions.
*/
+import java.io.BufferedReader;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.tools.doclint.DocLint;
-import com.sun.tools.doclint.DocLint.BadArgs;
-import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import com.sun.tools.doclint.DocLint;
+import com.sun.tools.doclint.DocLint.BadArgs;
public class DocLintTester {
@@ -60,6 +59,8 @@
opts.add(arg);
} else if (arg.startsWith("-XcustomTags")) {
opts.add(arg);
+ } else if (arg.startsWith("-XhtmlVersion")) {
+ opts.add(arg);
} else if (arg.startsWith("-")) {
opts.add(arg);
if (i < args.length - 1 && !args[i+1].startsWith("-"))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/HtmlVersionTest.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8072945
+ * @summary test HTML version
+ * @library ..
+ * @build DocLintTester
+ * @run main DocLintTester -XhtmlVersion:html5 HtmlVersionTest.java
+ * @run main DocLintTester -XhtmlVersion:html4 HtmlVersionTest.java
+ * @run main DocLintTester -badargs -XhtmlVersion: HtmlVersionTest.java
+ * @run main DocLintTester HtmlVersionTest.java
+ */
+
+/**
+ * Test HTML version option.
+ */
+public class HtmlVersionTest {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTest.java Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,210 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8072945
+ * @summary test tags and attributes specific to the output HTML version
+ * @library ..
+ * @build DocLintTester
+ * @run main DocLintTester -XhtmlVersion:html5 -ref HtmlVersionTagsAttrsTestHtml5.out HtmlVersionTagsAttrsTest.java
+ * @run main DocLintTester -XhtmlVersion:html4 -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java
+ * @run main DocLintTester -badargs -XhtmlVersion: HtmlVersionTagsAttrsTest.java
+ * @run main DocLintTester -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java
+ */
+
+/**
+ * Test HTML tags and attributes based on the output HTML version option.
+ */
+public class HtmlVersionTagsAttrsTest {
+ /**
+ * <a rev="help" href="rev_test.html">Help Page</a>
+ * <a charset="UTF-8" href="charset_test.html">Test page</a>
+ * <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
+ * <img name="name_test" alt="alt">
+ * <table>
+ * <tr><th axis="desc">Description</th></tr>
+ * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
+ * </table>
+ * <table summary="summary_test"><tr><td>Test Row</td></tr></table>
+ *
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ * <caption align="center">Test table, caption, col, colgroup, tbody,
+ * td, tfoot, th, thead and tr Align attribute</caption>
+ * <colgroup align="char" char="." charoff="2" valign="top" width="200">
+ * <col align="center" valign="top" width="200">
+ * <col align="char" char="." charoff="2">
+ * </colgroup>
+ * <thead align="char" char="." charoff="2" valign="top">
+ * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ * <th>HeadCol2</th>
+ * </tr>
+ * </thead>
+ * <tfoot align="char" char="." charoff="2" valign="top">
+ * <tr>
+ * <td>FootCol1</td>
+ * <td>FootCol2</td>
+ * </tr>
+ * </tfoot>
+ * <tbody align="char" char="." charoff="2" valign="top">
+ * <tr>
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ * <td>BodyCol2</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <br clear="left">
+ * <ol compact>
+ * <li>Test list</li>
+ * <li>Another item</li>
+ * </ol>
+ * <ul type="circle" compact>
+ * <li type="square">Test list</li>
+ * <li>Another item</li>
+ * </ul>
+ * <dl compact>
+ * <dt>Test list</dt>
+ * <dd>Test Description</dd>
+ * </dl>
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ * <hr size="20" noshade>
+ * <pre width="25">Test Pre</pre>
+ * <a name="AnchorTest">Anchor Test</a>
+ * <table border="0">
+ * <tr><td>Test border</td></tr>
+ * </table>
+ */
+ public void SupportedAttrs_in_html4_not_in_html5() { }
+
+ /**
+ * <ol reversed="reversed">
+ * <li>First</li>
+ * <li>Second</li>
+ * <li>Third</li>
+ * </ol>
+ * <img src="testImg.jpg" alt="imgTest" crossorigin="anonymous">
+ * <div aria-labelledby="Topics" aria-describedby="t1">
+ * <h1 id="Topics">Topics</h1>
+ * <p id="t1">Aria attribute test</p>
+ * <p id="t2" aria-label="Label">Label test</p>
+ * </div>
+ */
+ public void SupportedAttrs_in_html5_not_in_html4() { }
+
+ /**
+ * <p><big>Bigger text test</big></p>
+ * <center>Center text test</center>
+ * <font size="3">Font test</font>
+ * <p>Text <strike>strike</strike></p>
+ * <p><tt>Teletype text</tt></p>
+ * <section>
+ * <hgroup>
+ * <h1>Section</h1>
+ * <h2> Another heading</h2>
+ * </hgroup>
+ * hgroup no longer supported in HTML5.
+ * </section>
+ * <details>
+ * <summary>Summary</summary>
+ * <p>Details and Summary no longer supported in HTML5</p>
+ * </details>
+ */
+ public void notSupportedTags_html5() { }
+
+ /**
+ * <section>
+ * <p>Testing section tag</p>
+ * <h1>Section</h1>
+ * Section text.
+ * </section>
+ * <article>
+ * <p>Testing article tag</p>
+ * <h1>Article</h1>
+ * Article text.
+ * </article>
+ * <header>
+ * <nav>Navigation</nav>
+ * Testing header
+ * </header>
+ * <footer>
+ * <nav>Navigation</nav>
+ * Testing footer
+ * </footer>
+ * <main>
+ * Main content
+ * </main>
+ * <aside>
+ * <h2>Test aside</h2>
+ * <p>Description</p>
+ * </aside>
+ * <ul>
+ * <li>Testing<bdi>BDI</bdi></li>
+ * </ul>
+ * <figure>
+ * <img src="testImg.jpg" alt="imgTest">
+ * <figcaption>Fig. 1</figcaption>
+ * </figure>
+ * <p><mark>Marked</mark> text test</p>
+ * <nav>
+ * <ul>
+ * <li>Nav item 1</li>
+ * <li>Nav item 2</li>
+ * </ul>
+ * </nav>
+ * <template id="testTemplate">
+ * <div class="desc">Desc</div>
+ * </template>
+ * <p>Test current time is <time>10:00</time> at night</p>
+ * <p>Test <wbr>WBR</wbr> text</p>
+ */
+ public void SupportedTags_in_html5_not_in_html4() { }
+
+ /**
+ * <section>
+ * <p>Invalid use of section tag</p>
+ * </section>
+ * <article>
+ * <p>Invalid use of article tag</p>
+ * </article>
+ * <header>
+ * <header>
+ * Invalid nested header
+ * </header>
+ * <footer>
+ * Invalid nested footer
+ * </footer>
+ * <main>
+ * Invalid nested main
+ * </main>
+ * Invalid use of header
+ * </header>
+ * <footer>
+ * <header>
+ * Invalid nested header
+ * </header>
+ * <footer>
+ * Invalid nested footer
+ * </footer>
+ * <main>
+ * Invalid nested main
+ * </main>
+ * Invalid use of footer
+ * </footer>
+ * <table border="2">
+ * <tr><td>Test border</td></tr>
+ * </table>
+ */
+ public void invalidUsage() { }
+
+ /**
+ * <header role="banner">Main text</header>
+ * <div role="navigation">
+ * <ul><li>Test Nav</li></ul>
+ * </div>
+ * <table border="1">
+ * <tr><td>Test border</td></tr>
+ * </table>
+ * <table border="">
+ * <tr><td>Test border</td></tr>
+ * </table>
+ */
+ public void validUsage() { }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTestHtml4.out Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,212 @@
+HtmlVersionTagsAttrsTest.java:21: warning: attribute obsolete: name
+ * <img name="name_test" alt="alt">
+ ^
+HtmlVersionTagsAttrsTest.java:25: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:28: warning: attribute obsolete, use CSS instead: align
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: warning: attribute obsolete, use CSS instead: bgcolor
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:29: warning: attribute obsolete, use CSS instead: align
+ * <caption align="center">Test table, caption, col, colgroup, tbody,
+ ^
+HtmlVersionTagsAttrsTest.java:36: warning: attribute obsolete, use CSS instead: bgcolor
+ * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: bgcolor
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: height
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: width
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: nowrap
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: bgcolor
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: height
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: width
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: nowrap
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:54: warning: attribute obsolete, use CSS instead: clear
+ * <br clear="left">
+ ^
+HtmlVersionTagsAttrsTest.java:55: warning: attribute obsolete, use CSS instead: compact
+ * <ol compact>
+ ^
+HtmlVersionTagsAttrsTest.java:60: warning: attribute obsolete, use CSS instead: type
+ * <li type="square">Test list</li>
+ ^
+HtmlVersionTagsAttrsTest.java:63: warning: attribute obsolete, use CSS instead: compact
+ * <dl compact>
+ ^
+HtmlVersionTagsAttrsTest.java:67: warning: attribute obsolete, use CSS instead: hspace
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:67: warning: attribute obsolete, use CSS instead: vspace
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:67: warning: attribute obsolete, use CSS instead: border
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: size
+ * <hr size="20" noshade>
+ ^
+HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: noshade
+ * <hr size="20" noshade>
+ ^
+HtmlVersionTagsAttrsTest.java:69: warning: attribute obsolete, use CSS instead: width
+ * <pre width="25">Test Pre</pre>
+ ^
+HtmlVersionTagsAttrsTest.java:73: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:78: error: attribute not supported in HTML4: reversed
+ * <ol reversed="reversed">
+ ^
+HtmlVersionTagsAttrsTest.java:83: error: attribute not supported in HTML4: crossorigin
+ * <img src="testImg.jpg" alt="imgTest" crossorigin="anonymous">
+ ^
+HtmlVersionTagsAttrsTest.java:84: error: attribute not supported in HTML4: aria-labelledby
+ * <div aria-labelledby="Topics" aria-describedby="t1">
+ ^
+HtmlVersionTagsAttrsTest.java:84: error: attribute not supported in HTML4: aria-describedby
+ * <div aria-labelledby="Topics" aria-describedby="t1">
+ ^
+HtmlVersionTagsAttrsTest.java:87: error: attribute not supported in HTML4: aria-label
+ * <p id="t2" aria-label="Label">Label test</p>
+ ^
+HtmlVersionTagsAttrsTest.java:95: warning: attribute obsolete, use CSS instead: size
+ * <font size="3">Font test</font>
+ ^
+HtmlVersionTagsAttrsTest.java:98: error: tag not supported in the generated HTML version: section
+ * <section>
+ ^
+HtmlVersionTagsAttrsTest.java:99: error: unknown tag: hgroup
+ * <hgroup>
+ ^
+HtmlVersionTagsAttrsTest.java:102: error: unknown tag: hgroup
+ * </hgroup>
+ ^
+HtmlVersionTagsAttrsTest.java:105: error: unknown tag: details
+ * <details>
+ ^
+HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+ * <summary>Summary</summary>
+ ^
+HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+ * <summary>Summary</summary>
+ ^
+HtmlVersionTagsAttrsTest.java:108: error: unknown tag: details
+ * </details>
+ ^
+HtmlVersionTagsAttrsTest.java:113: error: tag not supported in the generated HTML version: section
+ * <section>
+ ^
+HtmlVersionTagsAttrsTest.java:118: error: tag not supported in the generated HTML version: article
+ * <article>
+ ^
+HtmlVersionTagsAttrsTest.java:123: error: tag not supported in the generated HTML version: header
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:124: error: tag not supported in the generated HTML version: nav
+ * <nav>Navigation</nav>
+ ^
+HtmlVersionTagsAttrsTest.java:127: error: tag not supported in the generated HTML version: footer
+ * <footer>
+ ^
+HtmlVersionTagsAttrsTest.java:128: error: tag not supported in the generated HTML version: nav
+ * <nav>Navigation</nav>
+ ^
+HtmlVersionTagsAttrsTest.java:131: error: tag not supported in the generated HTML version: main
+ * <main>
+ ^
+HtmlVersionTagsAttrsTest.java:134: error: tag not supported in the generated HTML version: aside
+ * <aside>
+ ^
+HtmlVersionTagsAttrsTest.java:139: error: tag not supported in the generated HTML version: bdi
+ * <li>Testing<bdi>BDI</bdi></li>
+ ^
+HtmlVersionTagsAttrsTest.java:141: error: tag not supported in the generated HTML version: figure
+ * <figure>
+ ^
+HtmlVersionTagsAttrsTest.java:143: error: tag not supported in the generated HTML version: figcaption
+ * <figcaption>Fig. 1</figcaption>
+ ^
+HtmlVersionTagsAttrsTest.java:145: error: tag not supported in the generated HTML version: mark
+ * <p><mark>Marked</mark> text test</p>
+ ^
+HtmlVersionTagsAttrsTest.java:146: error: tag not supported in the generated HTML version: nav
+ * <nav>
+ ^
+HtmlVersionTagsAttrsTest.java:152: error: tag not supported in the generated HTML version: template
+ * <template id="testTemplate">
+ ^
+HtmlVersionTagsAttrsTest.java:155: error: tag not supported in the generated HTML version: time
+ * <p>Test current time is <time>10:00</time> at night</p>
+ ^
+HtmlVersionTagsAttrsTest.java:156: error: tag not supported in the generated HTML version: wbr
+ * <p>Test <wbr>WBR</wbr> text</p>
+ ^
+HtmlVersionTagsAttrsTest.java:161: error: tag not supported in the generated HTML version: section
+ * <section>
+ ^
+HtmlVersionTagsAttrsTest.java:164: error: tag not supported in the generated HTML version: article
+ * <article>
+ ^
+HtmlVersionTagsAttrsTest.java:167: error: tag not supported in the generated HTML version: header
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:168: error: tag not supported in the generated HTML version: header
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:171: error: tag not supported in the generated HTML version: footer
+ * <footer>
+ ^
+HtmlVersionTagsAttrsTest.java:174: error: tag not supported in the generated HTML version: main
+ * <main>
+ ^
+HtmlVersionTagsAttrsTest.java:179: error: tag not supported in the generated HTML version: footer
+ * <footer>
+ ^
+HtmlVersionTagsAttrsTest.java:180: error: tag not supported in the generated HTML version: header
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:183: error: tag not supported in the generated HTML version: footer
+ * <footer>
+ ^
+HtmlVersionTagsAttrsTest.java:186: error: tag not supported in the generated HTML version: main
+ * <main>
+ ^
+HtmlVersionTagsAttrsTest.java:193: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:198: error: tag not supported in the generated HTML version: header
+ * <header role="banner">Main text</header>
+ ^
+HtmlVersionTagsAttrsTest.java:198: error: attribute not supported in HTML4: role
+ * <header role="banner">Main text</header>
+ ^
+HtmlVersionTagsAttrsTest.java:199: error: attribute not supported in HTML4: role
+ * <div role="navigation">
+ ^
+HtmlVersionTagsAttrsTest.java:204: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:207: error: no summary or caption for table
+ * </table>
+ ^
+46 errors
+24 warnings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTestHtml5.out Mon Apr 13 18:05:23 2015 -0700
@@ -0,0 +1,299 @@
+HtmlVersionTagsAttrsTest.java:18: error: attribute not supported in HTML5: rev
+ * <a rev="help" href="rev_test.html">Help Page</a>
+ ^
+HtmlVersionTagsAttrsTest.java:19: error: attribute not supported in HTML5: charset
+ * <a charset="UTF-8" href="charset_test.html">Test page</a>
+ ^
+HtmlVersionTagsAttrsTest.java:20: error: attribute not supported in HTML5: shape
+ * <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
+ ^
+HtmlVersionTagsAttrsTest.java:20: error: attribute not supported in HTML5: coords
+ * <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
+ ^
+HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: name
+ * <img name="name_test" alt="alt">
+ ^
+HtmlVersionTagsAttrsTest.java:23: error: attribute not supported in HTML5: axis
+ * <tr><th axis="desc">Description</th></tr>
+ ^
+HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: axis
+ * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
+ ^
+HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: abbr
+ * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
+ ^
+HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: scope
+ * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
+ ^
+HtmlVersionTagsAttrsTest.java:25: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: summary
+ * <table summary="summary_test"><tr><td>Test Row</td></tr></table>
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: align
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: bgcolor
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: cellpadding
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: cellspacing
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: frame
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: rules
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: width
+ * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: align
+ * <caption align="center">Test table, caption, col, colgroup, tbody,
+ ^
+HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: align
+ * <colgroup align="char" char="." charoff="2" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: char
+ * <colgroup align="char" char="." charoff="2" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: charoff
+ * <colgroup align="char" char="." charoff="2" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: valign
+ * <colgroup align="char" char="." charoff="2" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: width
+ * <colgroup align="char" char="." charoff="2" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: align
+ * <col align="center" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: valign
+ * <col align="center" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: width
+ * <col align="center" valign="top" width="200">
+ ^
+HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: align
+ * <col align="char" char="." charoff="2">
+ ^
+HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: char
+ * <col align="char" char="." charoff="2">
+ ^
+HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: charoff
+ * <col align="char" char="." charoff="2">
+ ^
+HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: align
+ * <thead align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: char
+ * <thead align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: charoff
+ * <thead align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: align
+ * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: char
+ * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: charoff
+ * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: bgcolor
+ * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: align
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: char
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: charoff
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: bgcolor
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: height
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: width
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: nowrap
+ * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
+ ^
+HtmlVersionTagsAttrsTest.java:41: error: attribute not supported in HTML5: align
+ * <tfoot align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:41: error: attribute not supported in HTML5: char
+ * <tfoot align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:41: error: attribute not supported in HTML5: charoff
+ * <tfoot align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: align
+ * <tbody align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: char
+ * <tbody align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: charoff
+ * <tbody align="char" char="." charoff="2" valign="top">
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: align
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: char
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: charoff
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: bgcolor
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: height
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: width
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: nowrap
+ * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
+ ^
+HtmlVersionTagsAttrsTest.java:54: error: attribute not supported in HTML5: clear
+ * <br clear="left">
+ ^
+HtmlVersionTagsAttrsTest.java:55: error: attribute not supported in HTML5: compact
+ * <ol compact>
+ ^
+HtmlVersionTagsAttrsTest.java:59: error: attribute not supported in HTML5: type
+ * <ul type="circle" compact>
+ ^
+HtmlVersionTagsAttrsTest.java:59: error: attribute not supported in HTML5: compact
+ * <ul type="circle" compact>
+ ^
+HtmlVersionTagsAttrsTest.java:60: error: attribute not supported in HTML5: type
+ * <li type="square">Test list</li>
+ ^
+HtmlVersionTagsAttrsTest.java:63: error: attribute not supported in HTML5: compact
+ * <dl compact>
+ ^
+HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: hspace
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: vspace
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: border
+ * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: size
+ * <hr size="20" noshade>
+ ^
+HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: noshade
+ * <hr size="20" noshade>
+ ^
+HtmlVersionTagsAttrsTest.java:69: error: attribute not supported in HTML5: width
+ * <pre width="25">Test Pre</pre>
+ ^
+HtmlVersionTagsAttrsTest.java:70: error: attribute not supported in HTML5: name
+ * <a name="AnchorTest">Anchor Test</a>
+ ^
+HtmlVersionTagsAttrsTest.java:71: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER
+ * <table border="0">
+ ^
+HtmlVersionTagsAttrsTest.java:73: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:93: error: tag not supported in the generated HTML version: big
+ * <p><big>Bigger text test</big></p>
+ ^
+HtmlVersionTagsAttrsTest.java:93: warning: empty <p> tag
+ * <p><big>Bigger text test</big></p>
+ ^
+HtmlVersionTagsAttrsTest.java:94: error: tag not supported in the generated HTML version: center
+ * <center>Center text test</center>
+ ^
+HtmlVersionTagsAttrsTest.java:95: error: tag not supported in the generated HTML version: font
+ * <font size="3">Font test</font>
+ ^
+HtmlVersionTagsAttrsTest.java:95: error: attribute not supported in HTML5: size
+ * <font size="3">Font test</font>
+ ^
+HtmlVersionTagsAttrsTest.java:96: error: tag not supported in the generated HTML version: strike
+ * <p>Text <strike>strike</strike></p>
+ ^
+HtmlVersionTagsAttrsTest.java:97: error: tag not supported in the generated HTML version: tt
+ * <p><tt>Teletype text</tt></p>
+ ^
+HtmlVersionTagsAttrsTest.java:97: warning: empty <p> tag
+ * <p><tt>Teletype text</tt></p>
+ ^
+HtmlVersionTagsAttrsTest.java:99: error: unknown tag: hgroup
+ * <hgroup>
+ ^
+HtmlVersionTagsAttrsTest.java:102: error: unknown tag: hgroup
+ * </hgroup>
+ ^
+HtmlVersionTagsAttrsTest.java:105: error: unknown tag: details
+ * <details>
+ ^
+HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+ * <summary>Summary</summary>
+ ^
+HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+ * <summary>Summary</summary>
+ ^
+HtmlVersionTagsAttrsTest.java:108: error: unknown tag: details
+ * </details>
+ ^
+HtmlVersionTagsAttrsTest.java:131: error: element not allowed in documentation comments: <main>
+ * <main>
+ ^
+HtmlVersionTagsAttrsTest.java:163: error: heading not found for </section>
+ * </section>
+ ^
+HtmlVersionTagsAttrsTest.java:166: error: heading not found for </article>
+ * </article>
+ ^
+HtmlVersionTagsAttrsTest.java:168: error: tag not allowed here: <header>
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:171: error: tag not allowed here: <footer>
+ * <footer>
+ ^
+HtmlVersionTagsAttrsTest.java:174: error: element not allowed in documentation comments: <main>
+ * <main>
+ ^
+HtmlVersionTagsAttrsTest.java:180: error: tag not allowed here: <header>
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:183: error: tag not allowed here: <footer>
+ * <footer>
+ ^
+HtmlVersionTagsAttrsTest.java:186: error: element not allowed in documentation comments: <main>
+ * <main>
+ ^
+HtmlVersionTagsAttrsTest.java:191: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER
+ * <table border="2">
+ ^
+HtmlVersionTagsAttrsTest.java:193: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:204: error: no summary or caption for table
+ * </table>
+ ^
+HtmlVersionTagsAttrsTest.java:207: error: no summary or caption for table
+ * </table>
+ ^
+97 errors
+2 warnings