8072945: Javadoc should generate valid and compliant HTML5 output
Reviewed-by: jjg, ksrini
This commit is contained in:
parent
ec05163d91
commit
9c427df72e
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -108,6 +108,7 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
public enum Flag {
|
public enum Flag {
|
||||||
TABLE_HAS_CAPTION,
|
TABLE_HAS_CAPTION,
|
||||||
HAS_ELEMENT,
|
HAS_ELEMENT,
|
||||||
|
HAS_HEADING,
|
||||||
HAS_INLINE_TAG,
|
HAS_INLINE_TAG,
|
||||||
HAS_TEXT,
|
HAS_TEXT,
|
||||||
REPORTED_BAD_INLINE
|
REPORTED_BAD_INLINE
|
||||||
@ -282,6 +283,8 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
final HtmlTag t = HtmlTag.get(treeName);
|
final HtmlTag t = HtmlTag.get(treeName);
|
||||||
if (t == null) {
|
if (t == null) {
|
||||||
env.messages.error(HTML, tree, "dc.tag.unknown", treeName);
|
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 {
|
} else {
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
for (TagStackItem tsi: tagStack) {
|
for (TagStackItem tsi: tagStack) {
|
||||||
@ -345,6 +348,12 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
parent.flags.add(Flag.TABLE_HAS_CAPTION);
|
parent.flags.add(Flag.TABLE_HAS_CAPTION);
|
||||||
break;
|
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:
|
case IMG:
|
||||||
if (!top.attrs.contains(HtmlTag.Attr.ALT))
|
if (!top.attrs.contains(HtmlTag.Attr.ALT))
|
||||||
env.messages.error(ACCESSIBILITY, tree, "dc.no.alt.attr.for.image");
|
env.messages.error(ACCESSIBILITY, tree, "dc.no.alt.attr.for.image");
|
||||||
@ -460,6 +469,14 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
env.messages.error(ACCESSIBILITY, tree,
|
env.messages.error(ACCESSIBILITY, tree,
|
||||||
"dc.no.summary.or.caption.for.table");
|
"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);
|
warnIfEmpty(top, tree);
|
||||||
tagStack.pop();
|
tagStack.pop();
|
||||||
@ -519,25 +536,21 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
Name name = tree.getName();
|
Name name = tree.getName();
|
||||||
HtmlTag.Attr attr = currTag.getAttr(name);
|
HtmlTag.Attr attr = currTag.getAttr(name);
|
||||||
if (attr != null) {
|
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);
|
boolean first = tagStack.peek().attrs.add(attr);
|
||||||
if (!first)
|
if (!first)
|
||||||
env.messages.error(HTML, tree, "dc.attr.repeated", name);
|
env.messages.error(HTML, tree, "dc.attr.repeated", name);
|
||||||
}
|
}
|
||||||
AttrKind k = currTag.getAttrKind(name);
|
AttrKind k = currTag.getAttrKind(name);
|
||||||
switch (k) {
|
switch (env.htmlVersion) {
|
||||||
case OK:
|
case HTML4:
|
||||||
|
validateHtml4Attrs(tree, name, k);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INVALID:
|
case HTML5:
|
||||||
env.messages.error(HTML, tree, "dc.attr.unknown", name);
|
validateHtml5Attrs(tree, name, k);
|
||||||
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,6 +603,20 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
|||||||
return super.visitAttribute(tree, ignore);
|
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) {
|
private boolean checkAnchor(String name) {
|
||||||
Element e = getEnclosingPackageOrClass(env.currElement);
|
Element e = getEnclosingPackageOrClass(env.currElement);
|
||||||
if (e == null)
|
if (e == null)
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -80,6 +80,7 @@ public class DocLint implements Plugin {
|
|||||||
private static final String STATS = "-stats";
|
private static final String STATS = "-stats";
|
||||||
public static final String XIMPLICIT_HEADERS = "-XimplicitHeaders:";
|
public static final String XIMPLICIT_HEADERS = "-XimplicitHeaders:";
|
||||||
public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:";
|
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 XCHECK_PACKAGE = "-XcheckPackage:";
|
||||||
public static final String SEPARATOR = ",";
|
public static final String SEPARATOR = ",";
|
||||||
|
|
||||||
@ -210,6 +211,14 @@ public class DocLint implements Plugin {
|
|||||||
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
|
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
|
||||||
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
||||||
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
|
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")
|
} else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help")
|
||||||
|| arg.equals("-?") || arg.equals("-usage")) {
|
|| arg.equals("-?") || arg.equals("-usage")) {
|
||||||
needHelp = true;
|
needHelp = true;
|
||||||
@ -274,6 +283,14 @@ public class DocLint implements Plugin {
|
|||||||
env.setImplicitHeaders(Character.digit(ch, 10));
|
env.setImplicitHeaders(Character.digit(ch, 10));
|
||||||
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
|
||||||
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
|
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)) {
|
} else if (arg.startsWith(XCHECK_PACKAGE)) {
|
||||||
env.setCheckPackages(arg.substring(arg.indexOf(":") + 1));
|
env.setCheckPackages(arg.substring(arg.indexOf(":") + 1));
|
||||||
} else
|
} else
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -99,6 +99,8 @@ public class Env {
|
|||||||
Set<Pattern> includePackages;
|
Set<Pattern> includePackages;
|
||||||
Set<Pattern> excludePackages;
|
Set<Pattern> excludePackages;
|
||||||
|
|
||||||
|
HtmlVersion htmlVersion = HtmlVersion.HTML4;
|
||||||
|
|
||||||
// Utility classes
|
// Utility classes
|
||||||
DocTrees trees;
|
DocTrees trees;
|
||||||
Elements elements;
|
Elements elements;
|
||||||
@ -193,6 +195,10 @@ public class Env {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setHtmlVersion(HtmlVersion version) {
|
||||||
|
htmlVersion = version;
|
||||||
|
}
|
||||||
|
|
||||||
/** Set the current declaration and its doc comment. */
|
/** Set the current declaration and its doc comment. */
|
||||||
void setCurrent(TreePath path, DocCommentTree comment) {
|
void setCurrent(TreePath path, DocCommentTree comment) {
|
||||||
currPath = path;
|
currPath = path;
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -51,26 +51,37 @@ import com.sun.tools.javac.util.StringUtils;
|
|||||||
*
|
*
|
||||||
* @see <a href="http://www.w3.org/TR/REC-html40/">HTML 4.01 Specification</a>
|
* @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/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 Bhavesh Patel
|
||||||
* @author Jonathan Gibbons (revised)
|
* @author Jonathan Gibbons (revised)
|
||||||
*/
|
*/
|
||||||
public enum HtmlTag {
|
public enum HtmlTag {
|
||||||
A(BlockType.INLINE, EndKind.REQUIRED,
|
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,
|
ABBR(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
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)),
|
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
||||||
|
|
||||||
ADDRESS(BlockType.INLINE, EndKind.REQUIRED,
|
ADDRESS(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
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,
|
B(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
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)),
|
EnumSet.of(Flag.EXPECT_CONTENT)),
|
||||||
|
|
||||||
BLOCKQUOTE(BlockType.BLOCK, EndKind.REQUIRED,
|
BLOCKQUOTE(BlockType.BLOCK, EndKind.REQUIRED,
|
||||||
@ -82,9 +93,10 @@ public enum HtmlTag {
|
|||||||
attrs(AttrKind.USE_CSS, CLEAR)),
|
attrs(AttrKind.USE_CSS, CLEAR)),
|
||||||
|
|
||||||
CAPTION(BlockType.TABLE_ITEM, EndKind.REQUIRED,
|
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)),
|
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
|
||||||
|
|
||||||
CITE(BlockType.INLINE, EndKind.REQUIRED,
|
CITE(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
@ -93,18 +105,30 @@ public enum HtmlTag {
|
|||||||
CODE(BlockType.INLINE, EndKind.REQUIRED,
|
CODE(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
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,
|
DD(BlockType.LIST_ITEM, EndKind.OPTIONAL,
|
||||||
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT)),
|
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT)),
|
||||||
|
|
||||||
DEL(BlockType.INLINE, EndKind.REQUIRED,
|
DEL(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST),
|
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,
|
DFN(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
||||||
|
|
||||||
DIV(BlockType.BLOCK, EndKind.REQUIRED,
|
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,
|
DL(BlockType.BLOCK, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT),
|
EnumSet.of(Flag.EXPECT_CONTENT),
|
||||||
@ -121,49 +145,95 @@ public enum HtmlTag {
|
|||||||
EM(BlockType.INLINE, EndKind.REQUIRED,
|
EM(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.NO_NEST)),
|
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),
|
EnumSet.of(Flag.EXPECT_CONTENT),
|
||||||
attrs(AttrKind.USE_CSS, SIZE, COLOR, FACE)),
|
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),
|
FIGCAPTION(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED),
|
||||||
H2(BlockType.BLOCK, EndKind.REQUIRED),
|
|
||||||
H3(BlockType.BLOCK, EndKind.REQUIRED),
|
FRAME(HtmlVersion.HTML4, BlockType.OTHER, EndKind.NONE),
|
||||||
H4(BlockType.BLOCK, EndKind.REQUIRED),
|
|
||||||
H5(BlockType.BLOCK, EndKind.REQUIRED),
|
FRAMESET(HtmlVersion.HTML4, BlockType.OTHER, EndKind.REQUIRED),
|
||||||
H6(BlockType.BLOCK, 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),
|
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,
|
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),
|
HTML(BlockType.OTHER, EndKind.REQUIRED),
|
||||||
|
|
||||||
I(BlockType.INLINE, EndKind.REQUIRED,
|
I(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
||||||
|
|
||||||
|
IFRAME(BlockType.OTHER, EndKind.REQUIRED),
|
||||||
|
|
||||||
IMG(BlockType.INLINE, EndKind.NONE,
|
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.OBSOLETE, NAME),
|
||||||
attrs(AttrKind.USE_CSS, ALIGN, HSPACE, VSPACE, BORDER)),
|
attrs(AttrKind.USE_CSS, ALIGN, HSPACE, VSPACE, BORDER)),
|
||||||
|
|
||||||
INS(BlockType.INLINE, EndKind.REQUIRED,
|
INS(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST),
|
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,
|
KBD(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
||||||
|
|
||||||
LI(BlockType.LIST_ITEM, EndKind.OPTIONAL,
|
LI(BlockType.LIST_ITEM, EndKind.OPTIONAL,
|
||||||
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
|
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),
|
LINK(BlockType.OTHER, EndKind.NONE),
|
||||||
|
|
||||||
|
MAIN(HtmlVersion.HTML5, BlockType.OTHER, EndKind.REQUIRED),
|
||||||
|
|
||||||
|
MARK(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
|
||||||
|
|
||||||
MENU(BlockType.BLOCK, EndKind.REQUIRED) {
|
MENU(BlockType.BLOCK, EndKind.REQUIRED) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
@ -173,13 +243,18 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
META(BlockType.OTHER, EndKind.NONE),
|
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),
|
NOSCRIPT(BlockType.BLOCK, EndKind.REQUIRED),
|
||||||
|
|
||||||
OL(BlockType.BLOCK, EndKind.REQUIRED,
|
OL(BlockType.BLOCK, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT),
|
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
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
return (t == LI);
|
return (t == LI);
|
||||||
@ -191,7 +266,8 @@ public enum HtmlTag {
|
|||||||
attrs(AttrKind.USE_CSS, ALIGN)),
|
attrs(AttrKind.USE_CSS, ALIGN)),
|
||||||
|
|
||||||
PRE(BlockType.BLOCK, EndKind.REQUIRED,
|
PRE(BlockType.BLOCK, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT)) {
|
EnumSet.of(Flag.EXPECT_CONTENT),
|
||||||
|
attrs(AttrKind.USE_CSS, WIDTH)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
switch (t) {
|
switch (t) {
|
||||||
@ -214,13 +290,16 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
SCRIPT(BlockType.OTHER, EndKind.REQUIRED),
|
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,
|
SMALL(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT)),
|
EnumSet.of(Flag.EXPECT_CONTENT)),
|
||||||
|
|
||||||
SPAN(BlockType.INLINE, EndKind.REQUIRED,
|
SPAN(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT)),
|
EnumSet.of(Flag.EXPECT_CONTENT)),
|
||||||
|
|
||||||
STRIKE(BlockType.INLINE, EndKind.REQUIRED,
|
STRIKE(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT)),
|
EnumSet.of(Flag.EXPECT_CONTENT)),
|
||||||
|
|
||||||
STRONG(BlockType.INLINE, EndKind.REQUIRED,
|
STRONG(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
@ -234,13 +313,14 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
TABLE(BlockType.BLOCK, EndKind.REQUIRED,
|
TABLE(BlockType.BLOCK, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT),
|
EnumSet.of(Flag.EXPECT_CONTENT),
|
||||||
attrs(AttrKind.OK, SUMMARY, Attr.FRAME, RULES, BORDER,
|
attrs(AttrKind.ALL, BORDER),
|
||||||
CELLPADDING, CELLSPACING, WIDTH), // width OK in 4.01; not allowed in 5
|
attrs(AttrKind.HTML4, SUMMARY, CELLPADDING, CELLSPACING, Attr.FRAME, RULES, WIDTH),
|
||||||
attrs(AttrKind.USE_CSS, ALIGN, BGCOLOR)) {
|
attrs(AttrKind.USE_CSS, ALIGN, BGCOLOR)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case CAPTION:
|
case CAPTION:
|
||||||
|
case COLGROUP:
|
||||||
case THEAD: case TBODY: case TFOOT:
|
case THEAD: case TBODY: case TFOOT:
|
||||||
case TR: // HTML 3.2
|
case TR: // HTML 3.2
|
||||||
return true;
|
return true;
|
||||||
@ -252,7 +332,8 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
TBODY(BlockType.TABLE_ITEM, EndKind.REQUIRED,
|
TBODY(BlockType.TABLE_ITEM, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT),
|
EnumSet.of(Flag.EXPECT_CONTENT),
|
||||||
attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN)) {
|
attrs(AttrKind.ALL, VALIGN),
|
||||||
|
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
return (t == TR);
|
return (t == TR);
|
||||||
@ -261,12 +342,16 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
TD(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
|
TD(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
|
||||||
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
|
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
|
||||||
attrs(AttrKind.OK, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR, AXIS,
|
attrs(AttrKind.ALL, COLSPAN, ROWSPAN, HEADERS, VALIGN),
|
||||||
ALIGN, CHAR, CHAROFF, VALIGN),
|
attrs(AttrKind.HTML4, AXIS, Attr.ABBR, SCOPE, ALIGN, CHAR, CHAROFF),
|
||||||
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
|
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,
|
TFOOT(BlockType.TABLE_ITEM, EndKind.REQUIRED,
|
||||||
attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN)) {
|
attrs(AttrKind.ALL, VALIGN),
|
||||||
|
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
return (t == TR);
|
return (t == TR);
|
||||||
@ -275,22 +360,27 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
TH(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
|
TH(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
|
||||||
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
|
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
|
||||||
attrs(AttrKind.OK, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR, AXIS,
|
attrs(AttrKind.ALL, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR,
|
||||||
ALIGN, CHAR, CHAROFF, VALIGN),
|
VALIGN),
|
||||||
|
attrs(AttrKind.HTML4, AXIS, ALIGN, CHAR, CHAROFF),
|
||||||
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
|
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
|
||||||
|
|
||||||
THEAD(BlockType.TABLE_ITEM, EndKind.REQUIRED,
|
THEAD(BlockType.TABLE_ITEM, EndKind.REQUIRED,
|
||||||
attrs(AttrKind.OK, ALIGN, CHAR, CHAROFF, VALIGN)) {
|
attrs(AttrKind.ALL, VALIGN),
|
||||||
|
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
return (t == TR);
|
return (t == TR);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
TIME(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
|
||||||
|
|
||||||
TITLE(BlockType.OTHER, EndKind.REQUIRED),
|
TITLE(BlockType.OTHER, EndKind.REQUIRED),
|
||||||
|
|
||||||
TR(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
|
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)) {
|
attrs(AttrKind.USE_CSS, BGCOLOR)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
@ -298,7 +388,7 @@ public enum HtmlTag {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
TT(BlockType.INLINE, EndKind.REQUIRED,
|
TT(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
|
||||||
|
|
||||||
U(BlockType.INLINE, EndKind.REQUIRED,
|
U(BlockType.INLINE, EndKind.REQUIRED,
|
||||||
@ -306,13 +396,15 @@ public enum HtmlTag {
|
|||||||
|
|
||||||
UL(BlockType.BLOCK, EndKind.REQUIRED,
|
UL(BlockType.BLOCK, EndKind.REQUIRED,
|
||||||
EnumSet.of(Flag.EXPECT_CONTENT),
|
EnumSet.of(Flag.EXPECT_CONTENT),
|
||||||
attrs(AttrKind.OK, COMPACT, TYPE)) { // OK in 4.01; not allowed in 5
|
attrs(AttrKind.HTML4, COMPACT, TYPE)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(HtmlTag t) {
|
public boolean accepts(HtmlTag t) {
|
||||||
return (t == LI);
|
return (t == LI);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
WBR(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED),
|
||||||
|
|
||||||
VAR(BlockType.INLINE, EndKind.REQUIRED);
|
VAR(BlockType.INLINE, EndKind.REQUIRED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -345,34 +437,66 @@ public enum HtmlTag {
|
|||||||
public static enum Attr {
|
public static enum Attr {
|
||||||
ABBR,
|
ABBR,
|
||||||
ALIGN,
|
ALIGN,
|
||||||
|
ALINK,
|
||||||
ALT,
|
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,
|
AXIS,
|
||||||
|
BACKGROUND,
|
||||||
BGCOLOR,
|
BGCOLOR,
|
||||||
BORDER,
|
BORDER,
|
||||||
CELLSPACING,
|
CELLSPACING,
|
||||||
CELLPADDING,
|
CELLPADDING,
|
||||||
CHAR,
|
CHAR,
|
||||||
CHAROFF,
|
CHAROFF,
|
||||||
|
CHARSET,
|
||||||
CITE,
|
CITE,
|
||||||
CLEAR,
|
CLEAR,
|
||||||
CLASS,
|
CLASS,
|
||||||
COLOR,
|
COLOR,
|
||||||
COLSPAN,
|
COLSPAN,
|
||||||
COMPACT,
|
COMPACT,
|
||||||
|
COORDS,
|
||||||
|
CROSSORIGIN,
|
||||||
DATETIME,
|
DATETIME,
|
||||||
FACE,
|
FACE,
|
||||||
FRAME,
|
FRAME,
|
||||||
|
FRAMEBORDER,
|
||||||
HEADERS,
|
HEADERS,
|
||||||
HEIGHT,
|
HEIGHT,
|
||||||
HREF,
|
HREF,
|
||||||
HSPACE,
|
HSPACE,
|
||||||
ID,
|
ID,
|
||||||
|
LINK,
|
||||||
|
LONGDESC,
|
||||||
|
MARGINHEIGHT,
|
||||||
|
MARGINWIDTH,
|
||||||
NAME,
|
NAME,
|
||||||
|
NOSHADE,
|
||||||
NOWRAP,
|
NOWRAP,
|
||||||
|
PROFILE,
|
||||||
|
REV,
|
||||||
REVERSED,
|
REVERSED,
|
||||||
|
ROLE,
|
||||||
ROWSPAN,
|
ROWSPAN,
|
||||||
RULES,
|
RULES,
|
||||||
|
SCHEME,
|
||||||
SCOPE,
|
SCOPE,
|
||||||
|
SCROLLING,
|
||||||
|
SHAPE,
|
||||||
SIZE,
|
SIZE,
|
||||||
SPACE,
|
SPACE,
|
||||||
SRC,
|
SRC,
|
||||||
@ -380,14 +504,23 @@ public enum HtmlTag {
|
|||||||
STYLE,
|
STYLE,
|
||||||
SUMMARY,
|
SUMMARY,
|
||||||
TARGET,
|
TARGET,
|
||||||
|
TEXT,
|
||||||
TYPE,
|
TYPE,
|
||||||
VALIGN,
|
VALIGN,
|
||||||
VALUE,
|
VALUE,
|
||||||
|
VERSION,
|
||||||
|
VLINK,
|
||||||
VSPACE,
|
VSPACE,
|
||||||
WIDTH;
|
WIDTH;
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
Attr() {
|
||||||
|
name = StringUtils.toLowerCase(name().replace("_", "-"));
|
||||||
|
}
|
||||||
|
|
||||||
public String getText() {
|
public String getText() {
|
||||||
return StringUtils.toLowerCase(name());
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final Map<String,Attr> index = new HashMap<>();
|
static final Map<String,Attr> index = new HashMap<>();
|
||||||
@ -399,10 +532,12 @@ public enum HtmlTag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static enum AttrKind {
|
public static enum AttrKind {
|
||||||
|
HTML4,
|
||||||
|
HTML5,
|
||||||
INVALID,
|
INVALID,
|
||||||
OBSOLETE,
|
OBSOLETE,
|
||||||
USE_CSS,
|
USE_CSS,
|
||||||
OK
|
ALL
|
||||||
}
|
}
|
||||||
|
|
||||||
// This class exists to avoid warnings from using parameterized vararg type
|
// This class exists to avoid warnings from using parameterized vararg type
|
||||||
@ -415,25 +550,52 @@ public enum HtmlTag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public final HtmlVersion allowedVersion;
|
||||||
public final BlockType blockType;
|
public final BlockType blockType;
|
||||||
public final EndKind endKind;
|
public final EndKind endKind;
|
||||||
public final Set<Flag> flags;
|
public final Set<Flag> flags;
|
||||||
private final Map<Attr,AttrKind> attrs;
|
private final Map<Attr,AttrKind> attrs;
|
||||||
|
|
||||||
HtmlTag(BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
|
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) {
|
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.blockType = blockType;
|
||||||
this.endKind = endKind;
|
this.endKind = endKind;
|
||||||
this.flags = flags;
|
this.flags = flags;
|
||||||
this.attrs = new EnumMap<>(Attr.class);
|
this.attrs = new EnumMap<>(Attr.class);
|
||||||
for (Map<Attr,AttrKind> m: attrMaps)
|
for (Map<Attr,AttrKind> m: attrMaps)
|
||||||
this.attrs.putAll(m);
|
this.attrs.putAll(m);
|
||||||
attrs.put(Attr.CLASS, AttrKind.OK);
|
attrs.put(Attr.CLASS, AttrKind.ALL);
|
||||||
attrs.put(Attr.ID, AttrKind.OK);
|
attrs.put(Attr.ID, AttrKind.ALL);
|
||||||
attrs.put(Attr.STYLE, AttrKind.OK);
|
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) {
|
public boolean accepts(HtmlTag t) {
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -27,9 +27,12 @@ dc.anchor.already.defined = anchor already defined: "{0}"
|
|||||||
dc.anchor.value.missing = no value given for anchor
|
dc.anchor.value.missing = no value given for anchor
|
||||||
dc.attr.lacks.value = attribute lacks value
|
dc.attr.lacks.value = attribute lacks value
|
||||||
dc.attr.not.number = attribute value is not a number
|
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 = attribute obsolete: {0}
|
||||||
dc.attr.obsolete.use.css = attribute obsolete, use CSS instead: {0}
|
dc.attr.obsolete.use.css = attribute obsolete, use CSS instead: {0}
|
||||||
dc.attr.repeated = repeated attribute: {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.attr.unknown = unknown attribute: {0}
|
||||||
dc.bad.option = bad option: {0}
|
dc.bad.option = bad option: {0}
|
||||||
dc.bad.value.for.option = bad value for option: {0} {1}
|
dc.bad.value.for.option = bad value for option: {0} {1}
|
||||||
@ -63,9 +66,11 @@ dc.tag.not.allowed.inline.tag = block element not allowed within @{1}: {0}
|
|||||||
dc.tag.not.allowed.inline.other = block element not allowed here: {0}
|
dc.tag.not.allowed.inline.other = block element not allowed here: {0}
|
||||||
dc.tag.not.closed= element not closed: {0}
|
dc.tag.not.closed= element not closed: {0}
|
||||||
dc.tag.p.in.pre= unexpected use of <p> inside <pre> element
|
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.self.closing = self-closing element not allowed
|
||||||
dc.tag.start.unmatched = end tag missing: </{0}>
|
dc.tag.start.unmatched = end tag missing: </{0}>
|
||||||
dc.tag.unknown = unknown tag: {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.text.not.allowed = text not allowed in <{0}> element
|
||||||
dc.type.arg.not.allowed = type arguments not allowed here
|
dc.type.arg.not.allowed = type arguments not allowed here
|
||||||
dc.unexpected.comment=documentation comment not expected here
|
dc.unexpected.comment=documentation comment not expected here
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -415,8 +415,10 @@ public abstract class AbstractMemberWriter {
|
|||||||
protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
|
protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
|
||||||
String tableSummary, String[] tableHeader, Content contentTree) {
|
String tableSummary, String[] tableHeader, Content contentTree) {
|
||||||
if (deprmembers.size() > 0) {
|
if (deprmembers.size() > 0) {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
|
Content caption = writer.getTableCaption(configuration.getResource(headingKey));
|
||||||
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"));
|
table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
for (int i = 0; i < deprmembers.size(); i++) {
|
for (int i = 0; i < deprmembers.size(); i++) {
|
||||||
@ -455,8 +457,10 @@ public abstract class AbstractMemberWriter {
|
|||||||
List<? extends ProgramElementDoc> members = mems;
|
List<? extends ProgramElementDoc> members = mems;
|
||||||
boolean printedUseTableHeader = false;
|
boolean printedUseTableHeader = false;
|
||||||
if (members.size() > 0) {
|
if (members.size() > 0) {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
|
Content caption = writer.getTableCaption(heading);
|
||||||
writer.getTableCaption(heading));
|
Content table = (configuration.isOutputHtml5())
|
||||||
|
? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.useSummary, tableSummary, caption);
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
Iterator<? extends ProgramElementDoc> it = members.iterator();
|
Iterator<? extends ProgramElementDoc> it = members.iterator();
|
||||||
for (int i = 0; it.hasNext(); i++) {
|
for (int i = 0; it.hasNext(); i++) {
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -149,13 +149,17 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
|
|||||||
protected void addIndexContents(Collection<PackageDoc> packages, String text,
|
protected void addIndexContents(Collection<PackageDoc> packages, String text,
|
||||||
String tableSummary, Content body) {
|
String tableSummary, Content body) {
|
||||||
if (!packages.isEmpty()) {
|
if (!packages.isEmpty()) {
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
|
||||||
div.addStyle(HtmlStyle.indexHeader);
|
? HtmlTree.NAV()
|
||||||
addAllClassesLink(div);
|
: new HtmlTree(HtmlTag.DIV);
|
||||||
|
htmlTree.addStyle(HtmlStyle.indexNav);
|
||||||
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
|
addAllClassesLink(ul);
|
||||||
if (configuration.showProfiles) {
|
if (configuration.showProfiles) {
|
||||||
addAllProfilesLink(div);
|
addAllProfilesLink(ul);
|
||||||
}
|
}
|
||||||
body.addContent(div);
|
htmlTree.addContent(ul);
|
||||||
|
body.addContent(htmlTree);
|
||||||
if (configuration.showProfiles && configuration.profilePackages.size() > 0) {
|
if (configuration.showProfiles && configuration.profilePackages.size() > 0) {
|
||||||
Content profileSummary = configuration.getResource("doclet.Profiles");
|
Content profileSummary = configuration.getResource("doclet.Profiles");
|
||||||
addProfilesList(profileSummary, body);
|
addProfilesList(profileSummary, body);
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -194,11 +194,15 @@ public abstract class AbstractProfileIndexWriter extends HtmlDocletWriter {
|
|||||||
protected void addIndexContents(Profiles profiles, String text,
|
protected void addIndexContents(Profiles profiles, String text,
|
||||||
String tableSummary, Content body) {
|
String tableSummary, Content body) {
|
||||||
if (profiles.getProfileCount() > 0) {
|
if (profiles.getProfileCount() > 0) {
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
|
||||||
div.addStyle(HtmlStyle.indexHeader);
|
? HtmlTree.NAV()
|
||||||
addAllClassesLink(div);
|
: new HtmlTree(HtmlTag.DIV);
|
||||||
addAllPackagesLink(div);
|
htmlTree.addStyle(HtmlStyle.indexNav);
|
||||||
body.addContent(div);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
|
addAllClassesLink(ul);
|
||||||
|
addAllPackagesLink(ul);
|
||||||
|
htmlTree.addContent(ul);
|
||||||
|
body.addContent(htmlTree);
|
||||||
addProfilesList(profiles, text, tableSummary, body);
|
addProfilesList(profiles, text, tableSummary, body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -215,12 +219,16 @@ public abstract class AbstractProfileIndexWriter extends HtmlDocletWriter {
|
|||||||
*/
|
*/
|
||||||
protected void addProfilePackagesIndexContents(Profiles profiles, String text,
|
protected void addProfilePackagesIndexContents(Profiles profiles, String text,
|
||||||
String tableSummary, Content body, String profileName) {
|
String tableSummary, Content body, String profileName) {
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
|
||||||
div.addStyle(HtmlStyle.indexHeader);
|
? HtmlTree.NAV()
|
||||||
addAllClassesLink(div);
|
: new HtmlTree(HtmlTag.DIV);
|
||||||
addAllPackagesLink(div);
|
htmlTree.addStyle(HtmlStyle.indexNav);
|
||||||
addAllProfilesLink(div);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
body.addContent(div);
|
addAllClassesLink(ul);
|
||||||
|
addAllPackagesLink(ul);
|
||||||
|
addAllProfilesLink(ul);
|
||||||
|
htmlTree.addContent(ul);
|
||||||
|
body.addContent(htmlTree);
|
||||||
addProfilePackagesList(profiles, text, tableSummary, body, profileName);
|
addProfilePackagesList(profiles, text, tableSummary, body, profileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -53,8 +53,6 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
|||||||
*/
|
*/
|
||||||
protected final ClassTree classtree;
|
protected final ClassTree classtree;
|
||||||
|
|
||||||
private static final String LI_CIRCLE = "circle";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor initializes classtree variable. This constructor will be used
|
* Constructor initializes classtree variable. This constructor will be used
|
||||||
* while generating global tree file "overview-tree.html".
|
* while generating global tree file "overview-tree.html".
|
||||||
@ -88,7 +86,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
|||||||
Content ul = new HtmlTree(HtmlTag.UL);
|
Content ul = new HtmlTree(HtmlTag.UL);
|
||||||
for (ClassDoc local : list) {
|
for (ClassDoc local : list) {
|
||||||
HtmlTree li = new HtmlTree(HtmlTag.LI);
|
HtmlTree li = new HtmlTree(HtmlTag.LI);
|
||||||
li.addAttr(HtmlAttr.TYPE, LI_CIRCLE);
|
li.addStyle(HtmlStyle.circle);
|
||||||
addPartialInfo(local, li);
|
addPartialInfo(local, li);
|
||||||
addExtendsImplements(parent, local, li);
|
addExtendsImplements(parent, local, li);
|
||||||
addLevelInfo(local, classtree.subs(local, isEnum),
|
addLevelInfo(local, classtree.subs(local, isEnum),
|
||||||
@ -108,14 +106,24 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
|||||||
* @param heading heading for the tree
|
* @param heading heading for the tree
|
||||||
* @param div the content tree to which the tree will be added
|
* @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()) {
|
if (!list.isEmpty()) {
|
||||||
ClassDoc firstClassDoc = list.first();
|
ClassDoc firstClassDoc = list.first();
|
||||||
Content headingContent = getResource(heading);
|
Content headingContent = getResource(heading);
|
||||||
div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
|
Content sectionHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
|
||||||
headingContent));
|
headingContent);
|
||||||
|
HtmlTree htmlTree;
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
htmlTree = HtmlTree.SECTION(sectionHeading);
|
||||||
|
} else {
|
||||||
|
div.addContent(sectionHeading);
|
||||||
|
htmlTree = div;
|
||||||
|
}
|
||||||
addLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
|
addLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
|
||||||
list, list == classtree.baseEnums(), div);
|
list, list == classtree.baseEnums(), htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
div.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -119,8 +119,10 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
|
|||||||
Content ul = new HtmlTree(HtmlTag.UL);
|
Content ul = new HtmlTree(HtmlTag.UL);
|
||||||
// Generate the class links and add it to the tdFont tree.
|
// Generate the class links and add it to the tdFont tree.
|
||||||
addAllClasses(ul, wantFrames);
|
addAllClasses(ul, wantFrames);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.indexContainer, ul);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
|
||||||
body.addContent(div);
|
? HtmlTree.MAIN(HtmlStyle.indexContainer, ul)
|
||||||
|
: HtmlTree.DIV(HtmlStyle.indexContainer, ul);
|
||||||
|
body.addContent(htmlTree);
|
||||||
printHtmlDocument(null, false, body);
|
printHtmlDocument(null, false, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -74,6 +74,13 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
|||||||
return writer.getMemberTreeHeader();
|
return writer.getMemberTreeHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -156,6 +163,10 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getAnnotationDetails(Content annotationDetailsTree) {
|
public Content getAnnotationDetails(Content annotationDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(annotationDetailsTree);
|
return getMemberTree(annotationDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -69,6 +69,13 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -75,6 +75,13 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
|||||||
return writer.getMemberTreeHeader();
|
return writer.getMemberTreeHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -158,6 +165,10 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getAnnotationDetails(Content annotationDetailsTree) {
|
public Content getAnnotationDetails(Content annotationDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(annotationDetailsTree);
|
return getMemberTree(annotationDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -151,9 +151,15 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
|||||||
String pkgname = (annotationType.containingPackage() != null)?
|
String pkgname = (annotationType.containingPackage() != null)?
|
||||||
annotationType.containingPackage().name(): "";
|
annotationType.containingPackage().name(): "";
|
||||||
String clname = annotationType.name();
|
String clname = annotationType.name();
|
||||||
Content bodyTree = getBody(true, getWindowTitle(clname));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(clname));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
|
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.header);
|
div.addStyle(HtmlStyle.header);
|
||||||
@ -169,7 +175,11 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
|||||||
HtmlStyle.title, headerContent);
|
HtmlStyle.title, headerContent);
|
||||||
heading.addContent(getTypeParameterLinks(linkInfo));
|
heading.addContent(getTypeParameterLinks(linkInfo));
|
||||||
div.addContent(heading);
|
div.addContent(heading);
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,8 +195,14 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
|||||||
*/
|
*/
|
||||||
public void addFooter(Content contentTree) {
|
public void addFooter(Content contentTree) {
|
||||||
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
|
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
|
||||||
addNavLinks(false, contentTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(contentTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: contentTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -90,6 +90,11 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
final String methodUseTableSummary;
|
final String methodUseTableSummary;
|
||||||
final String constructorUseTableSummary;
|
final String constructorUseTableSummary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The HTML tree for main tag.
|
||||||
|
*/
|
||||||
|
protected HtmlTree mainTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
@ -222,7 +227,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
* Generate the class use list.
|
* Generate the class use list.
|
||||||
*/
|
*/
|
||||||
protected void generateClassUseFile() throws IOException {
|
protected void generateClassUseFile() throws IOException {
|
||||||
Content body = getClassUseHeader();
|
HtmlTree body = getClassUseHeader();
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.classUseContainer);
|
div.addStyle(HtmlStyle.classUseContainer);
|
||||||
if (pkgSet.size() > 0) {
|
if (pkgSet.size() > 0) {
|
||||||
@ -231,9 +236,20 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
|
div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
|
||||||
classdoc.qualifiedName()));
|
classdoc.qualifiedName()));
|
||||||
}
|
}
|
||||||
body.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
addNavLinks(false, body);
|
mainTree.addContent(div);
|
||||||
addBottom(body);
|
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);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,11 +275,12 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
* @param contentTree the content tree to which the packages list will be added
|
* @param contentTree the content tree to which the packages list will be added
|
||||||
*/
|
*/
|
||||||
protected void addPackageList(Content contentTree) throws IOException {
|
protected void addPackageList(Content contentTree) throws IOException {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
|
Content caption = getTableCaption(configuration.getResource(
|
||||||
getTableCaption(configuration.getResource(
|
|
||||||
"doclet.ClassUse_Packages.that.use.0",
|
"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"));
|
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
Iterator<PackageDoc> it = pkgSet.iterator();
|
Iterator<PackageDoc> it = pkgSet.iterator();
|
||||||
@ -294,11 +311,13 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
pkgToPackageAnnotations.isEmpty()) {
|
pkgToPackageAnnotations.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
|
Content caption = getTableCaption(configuration.getResource(
|
||||||
getTableCaption(configuration.getResource(
|
|
||||||
"doclet.ClassUse_PackageAnnotation",
|
"doclet.ClassUse_PackageAnnotation",
|
||||||
getLink(new LinkInfoImpl(configuration,
|
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"));
|
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
|
Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
|
||||||
@ -333,15 +352,22 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.addStyle(HtmlStyle.blockList);
|
ul.addStyle(HtmlStyle.blockList);
|
||||||
for (PackageDoc pkg : pkgSet) {
|
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",
|
Content link = getResource("doclet.ClassUse_Uses.of.0.in.1",
|
||||||
getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER,
|
getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER,
|
||||||
classdoc)),
|
classdoc)),
|
||||||
getPackageLink(pkg, utils.getPackageName(pkg)));
|
getPackageLink(pkg, utils.getPackageName(pkg)));
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
|
Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
|
||||||
li.addContent(heading);
|
htmlTree.addContent(heading);
|
||||||
addClassUse(pkg, li);
|
addClassUse(pkg, htmlTree);
|
||||||
ul.addContent(li);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
|
Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
|
||||||
contentTree.addContent(li);
|
contentTree.addContent(li);
|
||||||
@ -443,15 +469,21 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
*
|
*
|
||||||
* @return a content tree representing the class use header
|
* @return a content tree representing the class use header
|
||||||
*/
|
*/
|
||||||
protected Content getClassUseHeader() {
|
protected HtmlTree getClassUseHeader() {
|
||||||
String cltype = configuration.getText(classdoc.isInterface()?
|
String cltype = configuration.getText(classdoc.isInterface()?
|
||||||
"doclet.Interface":"doclet.Class");
|
"doclet.Interface":"doclet.Class");
|
||||||
String clname = classdoc.qualifiedName();
|
String clname = classdoc.qualifiedName();
|
||||||
String title = configuration.getText("doclet.Window_ClassUse_Header",
|
String title = configuration.getText("doclet.Window_ClassUse_Header",
|
||||||
cltype, clname);
|
cltype, clname);
|
||||||
Content bodyTree = getBody(true, getWindowTitle(title));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
ContentBuilder headContent = new ContentBuilder();
|
ContentBuilder headContent = new ContentBuilder();
|
||||||
headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
|
headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
|
||||||
headContent.addContent(new HtmlTree(HtmlTag.BR));
|
headContent.addContent(new HtmlTree(HtmlTag.BR));
|
||||||
@ -459,7 +491,11 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
|||||||
Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
|
Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
|
||||||
true, HtmlStyle.title, headContent);
|
true, HtmlStyle.title, headContent);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -35,6 +35,7 @@ import com.sun.tools.doclets.internal.toolkit.*;
|
|||||||
import com.sun.tools.doclets.internal.toolkit.builders.*;
|
import com.sun.tools.doclets.internal.toolkit.builders.*;
|
||||||
import com.sun.tools.doclets.internal.toolkit.taglets.*;
|
import com.sun.tools.doclets.internal.toolkit.taglets.*;
|
||||||
import com.sun.tools.doclets.internal.toolkit.util.*;
|
import com.sun.tools.doclets.internal.toolkit.util.*;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -160,9 +161,15 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
|||||||
String pkgname = (classDoc.containingPackage() != null)?
|
String pkgname = (classDoc.containingPackage() != null)?
|
||||||
classDoc.containingPackage().name(): "";
|
classDoc.containingPackage().name(): "";
|
||||||
String clname = classDoc.name();
|
String clname = classDoc.name();
|
||||||
Content bodyTree = getBody(true, getWindowTitle(clname));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(clname));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
|
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.header);
|
div.addStyle(HtmlStyle.header);
|
||||||
@ -194,7 +201,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
|||||||
HtmlStyle.title, headerContent);
|
HtmlStyle.title, headerContent);
|
||||||
heading.addContent(getTypeParameterLinks(linkInfo));
|
heading.addContent(getTypeParameterLinks(linkInfo));
|
||||||
div.addContent(heading);
|
div.addContent(heading);
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,8 +221,14 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
|||||||
*/
|
*/
|
||||||
public void addFooter(Content contentTree) {
|
public void addFooter(Content contentTree) {
|
||||||
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
|
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
|
||||||
addNavLinks(false, contentTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(contentTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: contentTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -31,7 +31,7 @@ import java.util.*;
|
|||||||
import javax.tools.JavaFileManager;
|
import javax.tools.JavaFileManager;
|
||||||
|
|
||||||
import com.sun.javadoc.*;
|
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.*;
|
||||||
import com.sun.tools.doclets.internal.toolkit.util.*;
|
import com.sun.tools.doclets.internal.toolkit.util.*;
|
||||||
import com.sun.tools.doclint.DocLint;
|
import com.sun.tools.doclint.DocLint;
|
||||||
@ -175,6 +175,11 @@ public class ConfigurationImpl extends Configuration {
|
|||||||
*/
|
*/
|
||||||
public boolean createoverview = false;
|
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
|
* Collected set of doclint options
|
||||||
*/
|
*/
|
||||||
@ -279,6 +284,10 @@ public class ConfigurationImpl extends Configuration {
|
|||||||
nooverview = true;
|
nooverview = true;
|
||||||
} else if (opt.equals("-overview")) {
|
} else if (opt.equals("-overview")) {
|
||||||
overview = true;
|
overview = true;
|
||||||
|
} else if (opt.equals("-html4")) {
|
||||||
|
htmlVersion = HtmlVersion.HTML4;
|
||||||
|
} else if (opt.equals("-html5")) {
|
||||||
|
htmlVersion = HtmlVersion.HTML5;
|
||||||
} else if (opt.equals("-xdoclint")) {
|
} else if (opt.equals("-xdoclint")) {
|
||||||
doclintOpts.add(null);
|
doclintOpts.add(null);
|
||||||
} else if (opt.startsWith("-xdoclint:")) {
|
} else if (opt.startsWith("-xdoclint:")) {
|
||||||
@ -300,7 +309,8 @@ public class ConfigurationImpl extends Configuration {
|
|||||||
setTopFile(root);
|
setTopFile(root);
|
||||||
|
|
||||||
if (root instanceof RootDocImpl) {
|
if (root instanceof RootDocImpl) {
|
||||||
((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames());
|
((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames(),
|
||||||
|
StringUtils.toLowerCase(htmlVersion.name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,6 +346,8 @@ public class ConfigurationImpl extends Configuration {
|
|||||||
option.equals("-use") ||
|
option.equals("-use") ||
|
||||||
option.equals("-nonavbar") ||
|
option.equals("-nonavbar") ||
|
||||||
option.equals("-nooverview") ||
|
option.equals("-nooverview") ||
|
||||||
|
option.equals("-html4") ||
|
||||||
|
option.equals("-html5") ||
|
||||||
option.equals("-xdoclint") ||
|
option.equals("-xdoclint") ||
|
||||||
option.startsWith("-xdoclint:")) {
|
option.startsWith("-xdoclint:")) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -470,6 +482,20 @@ public class ConfigurationImpl extends Configuration {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -62,6 +62,16 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
|
|
||||||
private final String[] constantsTableHeader;
|
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.
|
* Construct a ConstantsSummaryWriter.
|
||||||
* @param configuration the configuration used in this run
|
* @param configuration the configuration used in this run
|
||||||
@ -85,9 +95,15 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
*/
|
*/
|
||||||
public Content getHeader() {
|
public Content getHeader() {
|
||||||
String label = configuration.getText("doclet.Constants_Summary");
|
String label = configuration.getText("doclet.Constants_Summary");
|
||||||
Content bodyTree = getBody(true, getWindowTitle(label));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(label));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +139,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getContentsList(Content contentListTree) {
|
public void addContentsList(Content contentTree, Content contentListTree) {
|
||||||
Content titleContent = getResource(
|
Content titleContent = getResource(
|
||||||
"doclet.Constants_Summary");
|
"doclet.Constants_Summary");
|
||||||
Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
||||||
@ -131,10 +147,18 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
Content div = HtmlTree.DIV(HtmlStyle.header, pHeading);
|
Content div = HtmlTree.DIV(HtmlStyle.header, pHeading);
|
||||||
Content headingContent = getResource(
|
Content headingContent = getResource(
|
||||||
"doclet.Contents");
|
"doclet.Contents");
|
||||||
div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
|
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
|
||||||
headingContent));
|
headingContent);
|
||||||
div.addContent(contentListTree);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
return div;
|
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 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addPackageName(PackageDoc pkg, String parsedPackageName,
|
public void addPackageName(String parsedPackageName, Content summariesTree, boolean first) {
|
||||||
Content summariesTree) {
|
|
||||||
Content pkgNameContent;
|
Content pkgNameContent;
|
||||||
|
if (!first && configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
summariesTree.addContent(summaryTree);
|
||||||
|
}
|
||||||
if (parsedPackageName.length() == 0) {
|
if (parsedPackageName.length() == 0) {
|
||||||
summariesTree.addContent(getMarkerAnchor(
|
summariesTree.addContent(getMarkerAnchor(
|
||||||
SectionName.UNNAMED_PACKAGE_ANCHOR));
|
SectionName.UNNAMED_PACKAGE_ANCHOR));
|
||||||
@ -165,7 +191,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
|
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
|
||||||
pkgNameContent);
|
pkgNameContent);
|
||||||
heading.addContent(headingContent);
|
heading.addContent(headingContent);
|
||||||
summariesTree.addContent(heading);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
summaryTree = HtmlTree.SECTION(heading);
|
||||||
|
} else {
|
||||||
|
summariesTree.addContent(heading);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,6 +207,17 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
return ul;
|
return ul;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@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
|
* Get the table caption and header for the constant summary table
|
||||||
*
|
*
|
||||||
@ -208,8 +249,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
* @return the table caption and header
|
* @return the table caption and header
|
||||||
*/
|
*/
|
||||||
protected Content getClassName(Content classStr) {
|
protected Content getClassName(Content classStr) {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
|
Content caption = getTableCaption(classStr);
|
||||||
getTableCaption(classStr));
|
Content table = (configuration.isOutputHtml5())
|
||||||
|
? HtmlTree.TABLE(HtmlStyle.constantsSummary, caption)
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.constantsSummary, constantsTableSummary, caption);
|
||||||
table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
|
table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
@ -297,12 +340,33 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
|||||||
return HtmlTree.TD(HtmlStyle.colLast, code);
|
return HtmlTree.TD(HtmlStyle.colLast, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addFooter(Content contentTree) {
|
public void addFooter(Content contentTree) {
|
||||||
addNavLinks(false, contentTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(contentTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: contentTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -89,6 +89,13 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -177,6 +184,10 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getConstructorDetails(Content constructorDetailsTree) {
|
public Content getConstructorDetails(Content constructorDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(constructorDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(constructorDetailsTree);
|
return getMemberTree(constructorDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -138,8 +138,11 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
|||||||
*/
|
*/
|
||||||
protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi)
|
protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
Content body = getHeader();
|
HtmlTree body = getHeader();
|
||||||
body.addContent(getContentsList(deprapi));
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
|
||||||
|
? HtmlTree.MAIN()
|
||||||
|
: body;
|
||||||
|
htmlTree.addContent(getContentsList(deprapi));
|
||||||
String memberTableSummary;
|
String memberTableSummary;
|
||||||
String[] memberTableHeader = new String[1];
|
String[] memberTableHeader = new String[1];
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
@ -164,9 +167,20 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
|||||||
HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
|
HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
body.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
addNavLinks(false, body);
|
htmlTree.addContent(div);
|
||||||
addBottom(body);
|
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);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,11 +240,17 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
|||||||
*
|
*
|
||||||
* @return a content tree for the header
|
* @return a content tree for the header
|
||||||
*/
|
*/
|
||||||
public Content getHeader() {
|
public HtmlTree getHeader() {
|
||||||
String title = configuration.getText("doclet.Window_Deprecated_List");
|
String title = configuration.getText("doclet.Window_Deprecated_List");
|
||||||
Content bodyTree = getBody(true, getWindowTitle(title));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -66,6 +66,13 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -140,6 +147,10 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) {
|
public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(enumConstantsDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(enumConstantsDetailsTree);
|
return getMemberTree(enumConstantsDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -67,6 +67,13 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -161,6 +168,10 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getFieldDetails(Content fieldDetailsTree) {
|
public Content getFieldDetails(Content fieldDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(fieldDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(fieldDetailsTree);
|
return getMemberTree(fieldDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,12 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
|||||||
protected void generateFrameFile() throws IOException {
|
protected void generateFrameFile() throws IOException {
|
||||||
Content frame = getFrameDetails();
|
Content frame = getFrameDetails();
|
||||||
HtmlTree body = new HtmlTree(HtmlTag.BODY);
|
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) {
|
if (configuration.windowtitle.length() > 0) {
|
||||||
printFramesDocument(configuration.windowtitle, configuration,
|
printFramesDocument(configuration.windowtitle, configuration,
|
||||||
body);
|
body);
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -44,6 +44,8 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
|
|||||||
*/
|
*/
|
||||||
public class HelpWriter extends HtmlDocletWriter {
|
public class HelpWriter extends HtmlDocletWriter {
|
||||||
|
|
||||||
|
HtmlTree mainTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor to construct HelpWriter object.
|
* Constructor to construct HelpWriter object.
|
||||||
* @param filename File to be generated.
|
* @param filename File to be generated.
|
||||||
@ -81,12 +83,24 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
*/
|
*/
|
||||||
protected void generateHelpFile() throws IOException {
|
protected void generateHelpFile() throws IOException {
|
||||||
String title = configuration.getText("doclet.Window_Help_title");
|
String title = configuration.getText("doclet.Window_Help_title");
|
||||||
Content body = getBody(true, getWindowTitle(title));
|
HtmlTree body = getBody(true, getWindowTitle(title));
|
||||||
addTop(body);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, body);
|
? HtmlTree.HEADER()
|
||||||
|
: body;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
addHelpFileContents(body);
|
addHelpFileContents(body);
|
||||||
addNavLinks(false, body);
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
addBottom(body);
|
htmlTree = HtmlTree.FOOTER();
|
||||||
|
}
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
printHtmlDocument(null, true, body);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,26 +119,39 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
Content line2 = HtmlTree.DIV(HtmlStyle.subTitle,
|
Content line2 = HtmlTree.DIV(HtmlStyle.subTitle,
|
||||||
getResource("doclet.Help_line_2"));
|
getResource("doclet.Help_line_2"));
|
||||||
div.addContent(line2);
|
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);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.addStyle(HtmlStyle.blockList);
|
ul.addStyle(HtmlStyle.blockList);
|
||||||
if (configuration.createoverview) {
|
if (configuration.createoverview) {
|
||||||
Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Overview"));
|
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",
|
Content line3 = getResource("doclet.Help_line_3",
|
||||||
getHyperLink(DocPaths.OVERVIEW_SUMMARY,
|
getHyperLink(DocPaths.OVERVIEW_SUMMARY,
|
||||||
configuration.getText("doclet.Overview")));
|
configuration.getText("doclet.Overview")));
|
||||||
Content overviewPara = HtmlTree.P(line3);
|
Content overviewPara = HtmlTree.P(line3);
|
||||||
liOverview.addContent(overviewPara);
|
htmlTree.addContent(overviewPara);
|
||||||
ul.addContent(liOverview);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Package"));
|
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 line4 = getResource("doclet.Help_line_4");
|
||||||
Content packagePara = HtmlTree.P(line4);
|
Content packagePara = HtmlTree.P(line4);
|
||||||
liPackage.addContent(packagePara);
|
htmlTree.addContent(packagePara);
|
||||||
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
|
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
|
||||||
ulPackage.addContent(HtmlTree.LI(
|
ulPackage.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Interfaces_Italic")));
|
getResource("doclet.Interfaces_Italic")));
|
||||||
@ -138,14 +165,20 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
getResource("doclet.Errors")));
|
getResource("doclet.Errors")));
|
||||||
ulPackage.addContent(HtmlTree.LI(
|
ulPackage.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.AnnotationTypes")));
|
getResource("doclet.AnnotationTypes")));
|
||||||
liPackage.addContent(ulPackage);
|
htmlTree.addContent(ulPackage);
|
||||||
ul.addContent(liPackage);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Help_line_5"));
|
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 line6 = getResource("doclet.Help_line_6");
|
||||||
Content classPara = HtmlTree.P(line6);
|
Content classPara = HtmlTree.P(line6);
|
||||||
liClass.addContent(classPara);
|
htmlTree.addContent(classPara);
|
||||||
HtmlTree ul1 = new HtmlTree(HtmlTag.UL);
|
HtmlTree ul1 = new HtmlTree(HtmlTag.UL);
|
||||||
ul1.addContent(HtmlTree.LI(
|
ul1.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Help_line_7")));
|
getResource("doclet.Help_line_7")));
|
||||||
@ -159,7 +192,7 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
getResource("doclet.Help_line_11")));
|
getResource("doclet.Help_line_11")));
|
||||||
ul1.addContent(HtmlTree.LI(
|
ul1.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Help_line_12")));
|
getResource("doclet.Help_line_12")));
|
||||||
liClass.addContent(ul1);
|
htmlTree.addContent(ul1);
|
||||||
HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
|
HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
|
||||||
ul2.addContent(HtmlTree.LI(
|
ul2.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Nested_Class_Summary")));
|
getResource("doclet.Nested_Class_Summary")));
|
||||||
@ -169,7 +202,7 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
getResource("doclet.Constructor_Summary")));
|
getResource("doclet.Constructor_Summary")));
|
||||||
ul2.addContent(HtmlTree.LI(
|
ul2.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Method_Summary")));
|
getResource("doclet.Method_Summary")));
|
||||||
liClass.addContent(ul2);
|
htmlTree.addContent(ul2);
|
||||||
HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
|
HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
|
||||||
ul3.addContent(HtmlTree.LI(
|
ul3.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Field_Detail")));
|
getResource("doclet.Field_Detail")));
|
||||||
@ -177,18 +210,24 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
getResource("doclet.Constructor_Detail")));
|
getResource("doclet.Constructor_Detail")));
|
||||||
ul3.addContent(HtmlTree.LI(
|
ul3.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Method_Detail")));
|
getResource("doclet.Method_Detail")));
|
||||||
liClass.addContent(ul3);
|
htmlTree.addContent(ul3);
|
||||||
Content line13 = getResource("doclet.Help_line_13");
|
Content line13 = getResource("doclet.Help_line_13");
|
||||||
Content para = HtmlTree.P(line13);
|
Content para = HtmlTree.P(line13);
|
||||||
liClass.addContent(para);
|
htmlTree.addContent(para);
|
||||||
ul.addContent(liClass);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
//Annotation Types
|
//Annotation Types
|
||||||
Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.AnnotationType"));
|
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 aline1 = getResource("doclet.Help_annotation_type_line_1");
|
||||||
Content aPara = HtmlTree.P(aline1);
|
Content aPara = HtmlTree.P(aline1);
|
||||||
liAnnotation.addContent(aPara);
|
htmlTree.addContent(aPara);
|
||||||
HtmlTree aul = new HtmlTree(HtmlTag.UL);
|
HtmlTree aul = new HtmlTree(HtmlTag.UL);
|
||||||
aul.addContent(HtmlTree.LI(
|
aul.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Help_annotation_type_line_2")));
|
getResource("doclet.Help_annotation_type_line_2")));
|
||||||
@ -200,15 +239,21 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
getResource("doclet.Annotation_Type_Optional_Member_Summary")));
|
getResource("doclet.Annotation_Type_Optional_Member_Summary")));
|
||||||
aul.addContent(HtmlTree.LI(
|
aul.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Annotation_Type_Member_Detail")));
|
getResource("doclet.Annotation_Type_Member_Detail")));
|
||||||
liAnnotation.addContent(aul);
|
htmlTree.addContent(aul);
|
||||||
ul.addContent(liAnnotation);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
//Enums
|
//Enums
|
||||||
Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Enum"));
|
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 eline1 = getResource("doclet.Help_enum_line_1");
|
||||||
Content enumPara = HtmlTree.P(eline1);
|
Content enumPara = HtmlTree.P(eline1);
|
||||||
liEnum.addContent(enumPara);
|
htmlTree.addContent(enumPara);
|
||||||
HtmlTree eul = new HtmlTree(HtmlTag.UL);
|
HtmlTree eul = new HtmlTree(HtmlTag.UL);
|
||||||
eul.addContent(HtmlTree.LI(
|
eul.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Help_enum_line_2")));
|
getResource("doclet.Help_enum_line_2")));
|
||||||
@ -218,46 +263,68 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
getResource("doclet.Enum_Constant_Summary")));
|
getResource("doclet.Enum_Constant_Summary")));
|
||||||
eul.addContent(HtmlTree.LI(
|
eul.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Enum_Constant_Detail")));
|
getResource("doclet.Enum_Constant_Detail")));
|
||||||
liEnum.addContent(eul);
|
htmlTree.addContent(eul);
|
||||||
ul.addContent(liEnum);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
if (configuration.classuse) {
|
if (configuration.classuse) {
|
||||||
Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Help_line_14"));
|
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 line15 = getResource("doclet.Help_line_15");
|
||||||
Content usePara = HtmlTree.P(line15);
|
Content usePara = HtmlTree.P(line15);
|
||||||
liUse.addContent(usePara);
|
htmlTree.addContent(usePara);
|
||||||
ul.addContent(liUse);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (configuration.createtree) {
|
if (configuration.createtree) {
|
||||||
Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Help_line_16"));
|
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",
|
Content line17 = getResource("doclet.Help_line_17_with_tree_link",
|
||||||
getHyperLink(DocPaths.OVERVIEW_TREE,
|
getHyperLink(DocPaths.OVERVIEW_TREE,
|
||||||
configuration.getText("doclet.Class_Hierarchy")),
|
configuration.getText("doclet.Class_Hierarchy")),
|
||||||
HtmlTree.CODE(new StringContent("java.lang.Object")));
|
HtmlTree.CODE(new StringContent("java.lang.Object")));
|
||||||
Content treePara = HtmlTree.P(line17);
|
Content treePara = HtmlTree.P(line17);
|
||||||
liTree.addContent(treePara);
|
htmlTree.addContent(treePara);
|
||||||
HtmlTree tul = new HtmlTree(HtmlTag.UL);
|
HtmlTree tul = new HtmlTree(HtmlTag.UL);
|
||||||
tul.addContent(HtmlTree.LI(
|
tul.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Help_line_18")));
|
getResource("doclet.Help_line_18")));
|
||||||
tul.addContent(HtmlTree.LI(
|
tul.addContent(HtmlTree.LI(
|
||||||
getResource("doclet.Help_line_19")));
|
getResource("doclet.Help_line_19")));
|
||||||
liTree.addContent(tul);
|
htmlTree.addContent(tul);
|
||||||
ul.addContent(liTree);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!(configuration.nodeprecatedlist ||
|
if (!(configuration.nodeprecatedlist ||
|
||||||
configuration.nodeprecated)) {
|
configuration.nodeprecated)) {
|
||||||
Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Deprecated_API"));
|
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",
|
Content line20 = getResource("doclet.Help_line_20_with_deprecated_api_link",
|
||||||
getHyperLink(DocPaths.DEPRECATED_LIST,
|
getHyperLink(DocPaths.DEPRECATED_LIST,
|
||||||
configuration.getText("doclet.Deprecated_API")));
|
configuration.getText("doclet.Deprecated_API")));
|
||||||
Content dPara = HtmlTree.P(line20);
|
Content dPara = HtmlTree.P(line20);
|
||||||
liDeprecated.addContent(dPara);
|
htmlTree.addContent(dPara);
|
||||||
ul.addContent(liDeprecated);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (configuration.createindex) {
|
if (configuration.createindex) {
|
||||||
Content indexlink;
|
Content indexlink;
|
||||||
@ -270,55 +337,96 @@ public class HelpWriter extends HtmlDocletWriter {
|
|||||||
}
|
}
|
||||||
Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Help_line_21"));
|
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 line22 = getResource("doclet.Help_line_22", indexlink);
|
||||||
Content indexPara = HtmlTree.P(line22);
|
Content indexPara = HtmlTree.P(line22);
|
||||||
liIndex.addContent(indexPara);
|
htmlTree.addContent(indexPara);
|
||||||
ul.addContent(liIndex);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Help_line_23"));
|
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 line24 = getResource("doclet.Help_line_24");
|
||||||
Content prevPara = HtmlTree.P(line24);
|
Content prevPara = HtmlTree.P(line24);
|
||||||
liPrev.addContent(prevPara);
|
htmlTree.addContent(prevPara);
|
||||||
ul.addContent(liPrev);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Help_line_25"));
|
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 line26 = getResource("doclet.Help_line_26");
|
||||||
Content framePara = HtmlTree.P(line26);
|
Content framePara = HtmlTree.P(line26);
|
||||||
liFrame.addContent(framePara);
|
htmlTree.addContent(framePara);
|
||||||
ul.addContent(liFrame);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content allclassesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content allclassesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.All_Classes"));
|
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",
|
Content line27 = getResource("doclet.Help_line_27",
|
||||||
getHyperLink(DocPaths.ALLCLASSES_NOFRAME,
|
getHyperLink(DocPaths.ALLCLASSES_NOFRAME,
|
||||||
configuration.getText("doclet.All_Classes")));
|
configuration.getText("doclet.All_Classes")));
|
||||||
Content allclassesPara = HtmlTree.P(line27);
|
Content allclassesPara = HtmlTree.P(line27);
|
||||||
liAllClasses.addContent(allclassesPara);
|
htmlTree.addContent(allclassesPara);
|
||||||
ul.addContent(liAllClasses);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Serialized_Form"));
|
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 line28 = getResource("doclet.Help_line_28");
|
||||||
Content serialPara = HtmlTree.P(line28);
|
Content serialPara = HtmlTree.P(line28);
|
||||||
liSerial.addContent(serialPara);
|
htmlTree.addContent(serialPara);
|
||||||
ul.addContent(liSerial);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
getResource("doclet.Constants_Summary"));
|
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",
|
Content line29 = getResource("doclet.Help_line_29",
|
||||||
getHyperLink(DocPaths.CONSTANT_VALUES,
|
getHyperLink(DocPaths.CONSTANT_VALUES,
|
||||||
configuration.getText("doclet.Constants_Summary")));
|
configuration.getText("doclet.Constants_Summary")));
|
||||||
Content constPara = HtmlTree.P(line29);
|
Content constPara = HtmlTree.P(line29);
|
||||||
liConst.addContent(constPara);
|
htmlTree.addContent(constPara);
|
||||||
ul.addContent(liConst);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
|
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
|
||||||
Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, getResource("doclet.Help_line_30"));
|
Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, getResource("doclet.Help_line_30"));
|
||||||
divContent.addContent(line30);
|
divContent.addContent(line30);
|
||||||
contentTree.addContent(divContent);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(divContent);
|
||||||
|
contentTree.addContent(mainTree);
|
||||||
|
} else {
|
||||||
|
contentTree.addContent(divContent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -183,8 +183,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
* @return a content tree for the script
|
* @return a content tree for the script
|
||||||
*/
|
*/
|
||||||
public Content getAllClassesLinkScript(String id) {
|
public Content getAllClassesLinkScript(String id) {
|
||||||
HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
|
HtmlTree script = HtmlTree.SCRIPT();
|
||||||
script.addAttr(HtmlAttr.TYPE, "text/javascript");
|
|
||||||
String scriptCode = "<!--" + DocletConstants.NL +
|
String scriptCode = "<!--" + DocletConstants.NL +
|
||||||
" allClassesLink = document.getElementById(\"" + id + "\");" + DocletConstants.NL +
|
" allClassesLink = document.getElementById(\"" + id + "\");" + DocletConstants.NL +
|
||||||
" if(window==top) {" + DocletConstants.NL +
|
" if(window==top) {" + DocletConstants.NL +
|
||||||
@ -197,6 +196,9 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
Content scriptContent = new RawHtml(scriptCode);
|
Content scriptContent = new RawHtml(scriptCode);
|
||||||
script.addContent(scriptContent);
|
script.addContent(scriptContent);
|
||||||
Content div = HtmlTree.DIV(script);
|
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;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,8 +344,9 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
if(classes.length > 0) {
|
if(classes.length > 0) {
|
||||||
Arrays.sort(classes);
|
Arrays.sort(classes);
|
||||||
Content caption = getTableCaption(new RawHtml(label));
|
Content caption = getTableCaption(new RawHtml(label));
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
|
Content table = (configuration.isOutputHtml5())
|
||||||
tableSummary, caption);
|
? HtmlTree.TABLE(HtmlStyle.typeSummary, caption)
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.typeSummary, tableSummary, caption);
|
||||||
table.addContent(getSummaryTableHeader(tableHeader, "col"));
|
table.addContent(getSummaryTableHeader(tableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
for (int i = 0; i < classes.length; i++) {
|
for (int i = 0; i < classes.length; i++) {
|
||||||
@ -393,7 +396,9 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
*/
|
*/
|
||||||
public void printHtmlDocument(String[] metakeywords, boolean includeScript,
|
public void printHtmlDocument(String[] metakeywords, boolean includeScript,
|
||||||
Content body) throws IOException {
|
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 htmlComment = new Comment(configuration.getText("doclet.New_Page"));
|
||||||
Content head = new HtmlTree(HtmlTag.HEAD);
|
Content head = new HtmlTree(HtmlTag.HEAD);
|
||||||
head.addContent(getGeneratedBy(!configuration.notimestamp));
|
head.addContent(getGeneratedBy(!configuration.notimestamp));
|
||||||
@ -404,7 +409,9 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
head.addContent(meta);
|
head.addContent(meta);
|
||||||
if (!configuration.notimestamp) {
|
if (!configuration.notimestamp) {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
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);
|
head.addContent(meta);
|
||||||
}
|
}
|
||||||
if (metakeywords != null) {
|
if (metakeywords != null) {
|
||||||
@ -459,38 +466,41 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
/**
|
/**
|
||||||
* Adds the user specified top.
|
* 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));
|
Content top = new RawHtml(replaceDocRootDir(configuration.top));
|
||||||
body.addContent(top);
|
htmlTree.addContent(top);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the user specified bottom.
|
* 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 bottom = new RawHtml(replaceDocRootDir(configuration.bottom));
|
||||||
Content small = HtmlTree.SMALL(bottom);
|
Content small = HtmlTree.SMALL(bottom);
|
||||||
Content p = HtmlTree.P(HtmlStyle.legalCopy, small);
|
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.
|
* 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 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) {
|
if (!configuration.nonavbar) {
|
||||||
|
Content tree = (configuration.allowTag(HtmlTag.NAV))
|
||||||
|
? HtmlTree.NAV()
|
||||||
|
: htmlTree;
|
||||||
String allClassesId = "allclasses_";
|
String allClassesId = "allclasses_";
|
||||||
HtmlTree navDiv = new HtmlTree(HtmlTag.DIV);
|
HtmlTree navDiv = new HtmlTree(HtmlTag.DIV);
|
||||||
Content skipNavLinks = configuration.getResource("doclet.Skip_navigation_links");
|
Content skipNavLinks = configuration.getResource("doclet.Skip_navigation_links");
|
||||||
if (header) {
|
if (header) {
|
||||||
body.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
|
tree.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
|
||||||
navDiv.addStyle(HtmlStyle.topNav);
|
navDiv.addStyle(HtmlStyle.topNav);
|
||||||
allClassesId += "navbar_top";
|
allClassesId += "navbar_top";
|
||||||
Content a = getMarkerAnchor(SectionName.NAVBAR_TOP);
|
Content a = getMarkerAnchor(SectionName.NAVBAR_TOP);
|
||||||
@ -501,7 +511,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
skipNavLinks.toString(), ""));
|
skipNavLinks.toString(), ""));
|
||||||
navDiv.addContent(skipLinkContent);
|
navDiv.addContent(skipLinkContent);
|
||||||
} else {
|
} else {
|
||||||
body.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
|
tree.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
|
||||||
navDiv.addStyle(HtmlStyle.bottomNav);
|
navDiv.addStyle(HtmlStyle.bottomNav);
|
||||||
allClassesId += "navbar_bottom";
|
allClassesId += "navbar_bottom";
|
||||||
Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM);
|
Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM);
|
||||||
@ -548,7 +558,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
navDiv.addContent(navList);
|
navDiv.addContent(navList);
|
||||||
Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, getUserHeaderFooter(header));
|
Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, getUserHeaderFooter(header));
|
||||||
navDiv.addContent(aboutDiv);
|
navDiv.addContent(aboutDiv);
|
||||||
body.addContent(navDiv);
|
tree.addContent(navDiv);
|
||||||
Content ulNav = HtmlTree.UL(HtmlStyle.navList, getNavLinkPrevious());
|
Content ulNav = HtmlTree.UL(HtmlStyle.navList, getNavLinkPrevious());
|
||||||
ulNav.addContent(getNavLinkNext());
|
ulNav.addContent(getNavLinkNext());
|
||||||
Content subDiv = HtmlTree.DIV(HtmlStyle.subNav, ulNav);
|
Content subDiv = HtmlTree.DIV(HtmlStyle.subNav, ulNav);
|
||||||
@ -562,12 +572,15 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
addSummaryDetailLinks(subDiv);
|
addSummaryDetailLinks(subDiv);
|
||||||
if (header) {
|
if (header) {
|
||||||
subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
|
subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
|
||||||
body.addContent(subDiv);
|
tree.addContent(subDiv);
|
||||||
body.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
|
tree.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
|
||||||
} else {
|
} else {
|
||||||
subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM));
|
subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM));
|
||||||
body.addContent(subDiv);
|
tree.addContent(subDiv);
|
||||||
body.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
|
tree.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
|
||||||
|
}
|
||||||
|
if (configuration.allowTag(HtmlTag.NAV)) {
|
||||||
|
htmlTree.addContent(tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -904,7 +917,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
public Content getMarkerAnchor(String anchorName, Content anchorContent) {
|
public Content getMarkerAnchor(String anchorName, Content anchorContent) {
|
||||||
if (anchorContent == null)
|
if (anchorContent == null)
|
||||||
anchorContent = new Comment(" ");
|
anchorContent = new Comment(" ");
|
||||||
Content markerAnchor = HtmlTree.A_NAME(anchorName, anchorContent);
|
Content markerAnchor = HtmlTree.A_ID(anchorName, anchorContent);
|
||||||
return markerAnchor;
|
return markerAnchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -942,8 +955,10 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
|
protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
|
||||||
String tableSummary, String[] tableHeader, Content contentTree) {
|
String tableSummary, String[] tableHeader, Content contentTree) {
|
||||||
if (deprPkgs.size() > 0) {
|
if (deprPkgs.size() > 0) {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
|
Content caption = getTableCaption(configuration.getResource(headingKey));
|
||||||
getTableCaption(configuration.getResource(headingKey)));
|
Content table = (configuration.isOutputHtml5())
|
||||||
|
? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
|
||||||
table.addContent(getSummaryTableHeader(tableHeader, "col"));
|
table.addContent(getSummaryTableHeader(tableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
for (int i = 0; i < deprPkgs.size(); i++) {
|
for (int i = 0; i < deprPkgs.size(); i++) {
|
||||||
@ -1829,8 +1844,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||||||
* @return an HtmlTree for the Script tag which provides the JavaScript location
|
* @return an HtmlTree for the Script tag which provides the JavaScript location
|
||||||
*/
|
*/
|
||||||
public HtmlTree getScriptProperties() {
|
public HtmlTree getScriptProperties() {
|
||||||
HtmlTree script = HtmlTree.SCRIPT("text/javascript",
|
HtmlTree script = HtmlTree.SCRIPT(pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
|
||||||
pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
|
|
||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -150,7 +150,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
|
|||||||
writer.getTagletWriterInstance(false), tagContent);
|
writer.getTagletWriterInstance(false), tagContent);
|
||||||
Content dlTags = new HtmlTree(HtmlTag.DL);
|
Content dlTags = new HtmlTree(HtmlTag.DL);
|
||||||
dlTags.addContent(tagContent);
|
dlTags.addContent(tagContent);
|
||||||
methodsContentTree.addContent(dlTags); // TODO: what if empty?
|
methodsContentTree.addContent(dlTags);
|
||||||
MethodDoc method = member;
|
MethodDoc method = member;
|
||||||
if (method.name().compareTo("writeExternal") == 0
|
if (method.name().compareTo("writeExternal") == 0
|
||||||
&& method.tags("serialData").length == 0) {
|
&& method.tags("serialData").length == 0) {
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -79,6 +79,13 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -182,6 +189,10 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getMethodDetails(Content methodDetailsTree) {
|
public Content getMethodDetails(Content methodDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(methodDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(methodDetailsTree);
|
return getMemberTree(methodDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -68,6 +68,13 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the writer.
|
* Close the writer.
|
||||||
*/
|
*/
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -93,15 +93,21 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
|||||||
try {
|
try {
|
||||||
packgen = new PackageFrameWriter(configuration, packageDoc);
|
packgen = new PackageFrameWriter(configuration, packageDoc);
|
||||||
String pkgName = configuration.utils.getPackageName(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);
|
Content pkgNameContent = new StringContent(pkgName);
|
||||||
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
|
||||||
|
? HtmlTree.MAIN()
|
||||||
|
: body;
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
|
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
|
||||||
packgen.getTargetPackageLink(packageDoc, "classFrame", pkgNameContent));
|
packgen.getTargetPackageLink(packageDoc, "classFrame", pkgNameContent));
|
||||||
body.addContent(heading);
|
htmlTree.addContent(heading);
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.indexContainer);
|
div.addStyle(HtmlStyle.indexContainer);
|
||||||
packgen.addClassListing(div);
|
packgen.addClassListing(div);
|
||||||
body.addContent(div);
|
htmlTree.addContent(div);
|
||||||
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
packgen.printHtmlDocument(
|
packgen.printHtmlDocument(
|
||||||
configuration.metakeywords.getMetaKeywords(packageDoc), false, body);
|
configuration.metakeywords.getMetaKeywords(packageDoc), false, body);
|
||||||
packgen.close();
|
packgen.close();
|
||||||
@ -120,7 +126,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
|||||||
*
|
*
|
||||||
* @param contentTree the content tree to which the listing will be added
|
* @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;
|
Configuration config = configuration;
|
||||||
if (packageDoc.isIncluded()) {
|
if (packageDoc.isIncluded()) {
|
||||||
addClassKindListing(packageDoc.interfaces(),
|
addClassKindListing(packageDoc.interfaces(),
|
||||||
@ -160,11 +166,14 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
|||||||
* @param contentTree the content tree to which the class kind listing will be added
|
* @param contentTree the content tree to which the class kind listing will be added
|
||||||
*/
|
*/
|
||||||
protected void addClassKindListing(ClassDoc[] arr, Content labelContent,
|
protected void addClassKindListing(ClassDoc[] arr, Content labelContent,
|
||||||
Content contentTree) {
|
HtmlTree contentTree) {
|
||||||
arr = utils.filterOutPrivateClasses(arr, configuration.javafx);
|
arr = utils.filterOutPrivateClasses(arr, configuration.javafx);
|
||||||
if(arr.length > 0) {
|
if(arr.length > 0) {
|
||||||
Arrays.sort(arr);
|
Arrays.sort(arr);
|
||||||
boolean printedHeader = false;
|
boolean printedHeader = false;
|
||||||
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
|
||||||
|
? HtmlTree.SECTION()
|
||||||
|
: contentTree;
|
||||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.setTitle(labelContent);
|
ul.setTitle(labelContent);
|
||||||
for (ClassDoc classDoc : arr) {
|
for (ClassDoc classDoc : arr) {
|
||||||
@ -177,7 +186,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
|||||||
if (!printedHeader) {
|
if (!printedHeader) {
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
true, labelContent);
|
true, labelContent);
|
||||||
contentTree.addContent(heading);
|
htmlTree.addContent(heading);
|
||||||
printedHeader = true;
|
printedHeader = true;
|
||||||
}
|
}
|
||||||
Content arr_i_name = new StringContent(classDoc.name());
|
Content arr_i_name = new StringContent(classDoc.name());
|
||||||
@ -188,7 +197,10 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
|||||||
Content li = HtmlTree.LI(link);
|
Content li = HtmlTree.LI(link);
|
||||||
ul.addContent(li);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
contentTree.addContent(ul);
|
htmlTree.addContent(ul);
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -83,7 +83,9 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
|||||||
String tableSummary, Content body) {
|
String tableSummary, Content body) {
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
|
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
|
||||||
packagesLabel);
|
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);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.setTitle(packagesLabel);
|
ul.setTitle(packagesLabel);
|
||||||
for (PackageDoc aPackage : packages) {
|
for (PackageDoc aPackage : packages) {
|
||||||
@ -94,8 +96,8 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
|||||||
ul.addContent(getPackage(aPackage));
|
ul.addContent(getPackage(aPackage));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.addContent(ul);
|
htmlTree.addContent(ul);
|
||||||
body.addContent(div);
|
body.addContent(htmlTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -146,26 +148,26 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
|||||||
* Adds "All Classes" link for the top of the left-hand frame page to the
|
* Adds "All Classes" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
|
||||||
allclassesLabel, "", "packageFrame");
|
allclassesLabel, "", "packageFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds "All Profiles" link for the top of the left-hand frame page to the
|
* Adds "All Profiles" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
|
||||||
allprofilesLabel, "", "packageListFrame");
|
allprofilesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -66,6 +66,11 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
*/
|
*/
|
||||||
private List<String> groupList;
|
private List<String> groupList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HTML tree for main tag.
|
||||||
|
*/
|
||||||
|
private HtmlTree htmlTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the PackageIndexWriter. Also constructs the grouping
|
* Construct the PackageIndexWriter. Also constructs the grouping
|
||||||
* information as provided on the command line by "-group" option. Stores
|
* information as provided on the command line by "-group" option. Stores
|
||||||
@ -140,7 +145,11 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
}
|
}
|
||||||
profilesDiv.addContent(ul);
|
profilesDiv.addContent(ul);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv);
|
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 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
*/
|
*/
|
||||||
protected void addPackagesList(Collection<PackageDoc> packages, String text,
|
protected void addPackagesList(Collection<PackageDoc> packages, String text,
|
||||||
String tableSummary, Content body) {
|
String tableSummary, Content body) {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary,
|
Content table = (configuration.isOutputHtml5())
|
||||||
getTableCaption(new RawHtml(text)));
|
? HtmlTree.TABLE(HtmlStyle.overviewSummary, getTableCaption(new RawHtml(text)))
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.overviewSummary, tableSummary, getTableCaption(new RawHtml(text)));
|
||||||
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
|
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
addPackagesList(packages, tbody);
|
addPackagesList(packages, tbody);
|
||||||
table.addContent(tbody);
|
table.addContent(tbody);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table);
|
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 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
* @param body the documentation tree to which the overview header will be added
|
* @param body the documentation tree to which the overview header will be added
|
||||||
*/
|
*/
|
||||||
protected void addOverviewHeader(Content body) {
|
protected void addOverviewHeader(Content body) {
|
||||||
|
addConfigurationTitle(body);
|
||||||
if (root.inlineTags().length > 0) {
|
if (root.inlineTags().length > 0) {
|
||||||
HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV);
|
HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV);
|
||||||
subTitleDiv.addStyle(HtmlStyle.subTitle);
|
subTitleDiv.addStyle(HtmlStyle.subTitle);
|
||||||
@ -205,7 +220,11 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
descriptionLabel, "", "");
|
descriptionLabel, "", "");
|
||||||
descPara.addContent(descLink);
|
descPara.addContent(descLink);
|
||||||
div.addContent(descPara);
|
div.addContent(descPara);
|
||||||
body.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
htmlTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
body.addContent(div);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +254,12 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
div.addStyle(HtmlStyle.contentContainer);
|
div.addStyle(HtmlStyle.contentContainer);
|
||||||
addOverviewComment(div);
|
addOverviewComment(div);
|
||||||
addTagsInfo(root, 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 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
* @body the documentation tree to which the navigation bar header will be added
|
* @body the documentation tree to which the navigation bar header will be added
|
||||||
*/
|
*/
|
||||||
protected void addNavigationBarHeader(Content body) {
|
protected void addNavigationBarHeader(Content body) {
|
||||||
addTop(body);
|
Content htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, body);
|
? HtmlTree.HEADER()
|
||||||
addConfigurationTitle(body);
|
: body;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -258,7 +287,13 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
|||||||
* @param body the documentation tree to which the navigation bar footer will be added
|
* @param body the documentation tree to which the navigation bar footer will be added
|
||||||
*/
|
*/
|
||||||
protected void addNavigationBarFooter(Content body) {
|
protected void addNavigationBarFooter(Content body) {
|
||||||
addNavLinks(false, body);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(body);
|
? HtmlTree.FOOTER()
|
||||||
|
: body;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -113,7 +113,10 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
|||||||
* Generate a separate tree file for each package.
|
* Generate a separate tree file for each package.
|
||||||
*/
|
*/
|
||||||
protected void generatePackageTreeFile() throws IOException {
|
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",
|
Content headContent = getResource("doclet.Hierarchy_For_Package",
|
||||||
utils.getPackageName(packagedoc));
|
utils.getPackageName(packagedoc));
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
|
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
|
||||||
@ -122,16 +125,25 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
|||||||
if (configuration.packages.size() > 1) {
|
if (configuration.packages.size() > 1) {
|
||||||
addLinkToMainTree(div);
|
addLinkToMainTree(div);
|
||||||
}
|
}
|
||||||
body.addContent(div);
|
htmlTree.addContent(div);
|
||||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||||
divTree.addStyle(HtmlStyle.contentContainer);
|
divTree.addStyle(HtmlStyle.contentContainer);
|
||||||
addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
|
addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
|
||||||
addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
|
addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
|
||||||
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
|
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
|
||||||
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
|
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
|
||||||
body.addContent(divTree);
|
htmlTree.addContent(divTree);
|
||||||
addNavLinks(false, body);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
addBottom(body);
|
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);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,12 +152,18 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
|||||||
*
|
*
|
||||||
* @return a content tree for the header
|
* @return a content tree for the header
|
||||||
*/
|
*/
|
||||||
protected Content getPackageTreeHeader() {
|
protected HtmlTree getPackageTreeHeader() {
|
||||||
String title = packagedoc.name() + " " +
|
String title = packagedoc.name() + " " +
|
||||||
configuration.getText("doclet.Window_Class_Hierarchy");
|
configuration.getText("doclet.Window_Class_Hierarchy");
|
||||||
Content bodyTree = getBody(true, getWindowTitle(title));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -48,6 +48,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
|
|
||||||
final PackageDoc pkgdoc;
|
final PackageDoc pkgdoc;
|
||||||
final SortedMap<String,Set<ClassDoc>> usingPackageToUsedClasses = new TreeMap<>();
|
final SortedMap<String,Set<ClassDoc>> usingPackageToUsedClasses = new TreeMap<>();
|
||||||
|
protected HtmlTree mainTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -112,7 +113,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
* Generate the package use list.
|
* Generate the package use list.
|
||||||
*/
|
*/
|
||||||
protected void generatePackageUseFile() throws IOException {
|
protected void generatePackageUseFile() throws IOException {
|
||||||
Content body = getPackageUseHeader();
|
HtmlTree body = getPackageUseHeader();
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.contentContainer);
|
div.addStyle(HtmlStyle.contentContainer);
|
||||||
if (usingPackageToUsedClasses.isEmpty()) {
|
if (usingPackageToUsedClasses.isEmpty()) {
|
||||||
@ -121,9 +122,20 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
} else {
|
} else {
|
||||||
addPackageUse(div);
|
addPackageUse(div);
|
||||||
}
|
}
|
||||||
body.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
addNavLinks(false, body);
|
mainTree.addContent(div);
|
||||||
addBottom(body);
|
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);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,10 +160,12 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
* @param contentTree the content tree to which the package list will be added
|
* @param contentTree the content tree to which the package list will be added
|
||||||
*/
|
*/
|
||||||
protected void addPackageList(Content contentTree) throws IOException {
|
protected void addPackageList(Content contentTree) throws IOException {
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
|
Content caption = getTableCaption(configuration.getResource(
|
||||||
getTableCaption(configuration.getResource(
|
|
||||||
"doclet.ClassUse_Packages.that.use.0",
|
"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"));
|
table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
|
Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
|
||||||
@ -191,11 +205,13 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
}
|
}
|
||||||
String tableSummary = configuration.getText("doclet.Use_Table_Summary",
|
String tableSummary = configuration.getText("doclet.Use_Table_Summary",
|
||||||
configuration.getText("doclet.classes"));
|
configuration.getText("doclet.classes"));
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
|
Content caption = getTableCaption(configuration.getResource(
|
||||||
getTableCaption(configuration.getResource(
|
"doclet.ClassUse_Classes.in.0.used.by.1",
|
||||||
"doclet.ClassUse_Classes.in.0.used.by.1",
|
getPackageLink(pkgdoc, utils.getPackageName(pkgdoc)),
|
||||||
getPackageLink(pkgdoc, utils.getPackageName(pkgdoc)),
|
getPackageLink(usingPackage, utils.getPackageName(usingPackage))));
|
||||||
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"));
|
table.addContent(getSummaryTableHeader(classTableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
Iterator<ClassDoc> itc =
|
Iterator<ClassDoc> itc =
|
||||||
@ -259,14 +275,20 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
*
|
*
|
||||||
* @return a content tree representing the package use header
|
* @return a content tree representing the package use header
|
||||||
*/
|
*/
|
||||||
protected Content getPackageUseHeader() {
|
protected HtmlTree getPackageUseHeader() {
|
||||||
String packageText = configuration.getText("doclet.Package");
|
String packageText = configuration.getText("doclet.Package");
|
||||||
String name = pkgdoc.name();
|
String name = pkgdoc.name();
|
||||||
String title = configuration.getText("doclet.Window_ClassUse_Header",
|
String title = configuration.getText("doclet.Window_ClassUse_Header",
|
||||||
packageText, name);
|
packageText, name);
|
||||||
Content bodyTree = getBody(true, getWindowTitle(title));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
ContentBuilder headContent = new ContentBuilder();
|
ContentBuilder headContent = new ContentBuilder();
|
||||||
headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
|
headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
|
||||||
headContent.addContent(new HtmlTree(HtmlTag.BR));
|
headContent.addContent(new HtmlTree(HtmlTag.BR));
|
||||||
@ -274,7 +296,11 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
|||||||
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
||||||
HtmlStyle.title, headContent);
|
HtmlStyle.title, headContent);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -64,6 +64,16 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
|||||||
*/
|
*/
|
||||||
protected PackageDoc packageDoc;
|
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
|
* Constructor to construct PackageWriter object and to generate
|
||||||
* "package-summary.html" file in the respective package directory.
|
* "package-summary.html" file in the respective package directory.
|
||||||
@ -90,9 +100,15 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getPackageHeader(String heading) {
|
public Content getPackageHeader(String heading) {
|
||||||
Content bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.header);
|
div.addStyle(HtmlStyle.header);
|
||||||
Content annotationContent = new HtmlTree(HtmlTag.P);
|
Content annotationContent = new HtmlTree(HtmlTag.P);
|
||||||
@ -117,7 +133,11 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
|||||||
Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
|
Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
|
||||||
div.addContent(descPara);
|
div.addContent(descPara);
|
||||||
}
|
}
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,8 +189,9 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
|||||||
if(classes.length > 0) {
|
if(classes.length > 0) {
|
||||||
Arrays.sort(classes);
|
Arrays.sort(classes);
|
||||||
Content caption = getTableCaption(new RawHtml(label));
|
Content caption = getTableCaption(new RawHtml(label));
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
|
Content table = (configuration.isOutputHtml5())
|
||||||
tableSummary, caption);
|
? HtmlTree.TABLE(HtmlStyle.typeSummary, caption)
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.typeSummary, tableSummary, caption);
|
||||||
table.addContent(getSummaryTableHeader(tableHeader, "col"));
|
table.addContent(getSummaryTableHeader(tableHeader, "col"));
|
||||||
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
Content tbody = new HtmlTree(HtmlTag.TBODY);
|
||||||
for (int i = 0; i < classes.length; i++) {
|
for (int i = 0; i < classes.length; i++) {
|
||||||
@ -216,9 +237,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
|||||||
Content h2Content = new StringContent(
|
Content h2Content = new StringContent(
|
||||||
configuration.getText("doclet.Package_Description",
|
configuration.getText("doclet.Package_Description",
|
||||||
packageDoc.name()));
|
packageDoc.name()));
|
||||||
packageContentTree.addContent(HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING,
|
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content);
|
||||||
true, h2Content));
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
addInlineComment(packageDoc, packageContentTree);
|
sectionTree.addContent(heading);
|
||||||
|
addInlineComment(packageDoc, sectionTree);
|
||||||
|
} else {
|
||||||
|
packageContentTree.addContent(heading);
|
||||||
|
addInlineComment(packageDoc, packageContentTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,15 +252,37 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addPackageTags(Content packageContentTree) {
|
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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addPackageFooter(Content contentTree) {
|
public void addPackageFooter(Content contentTree) {
|
||||||
addNavLinks(false, contentTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(contentTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: contentTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -85,7 +85,9 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
String tableSummary, Content body) {
|
String tableSummary, Content body) {
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true,
|
Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true,
|
||||||
profilesLabel);
|
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);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.setTitle(profilesLabel);
|
ul.setTitle(profilesLabel);
|
||||||
String profileName;
|
String profileName;
|
||||||
@ -96,8 +98,8 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
if (configuration.shouldDocumentProfile(profileName))
|
if (configuration.shouldDocumentProfile(profileName))
|
||||||
ul.addContent(getProfile(profileName));
|
ul.addContent(getProfile(profileName));
|
||||||
}
|
}
|
||||||
div.addContent(ul);
|
htmlTree.addContent(ul);
|
||||||
body.addContent(div);
|
body.addContent(htmlTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -141,26 +143,26 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
* Adds "All Classes" link for the top of the left-hand frame page to the
|
* Adds "All Classes" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
|
||||||
allclassesLabel, "", "packageFrame");
|
allclassesLabel, "", "packageFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds "All Packages" link for the top of the left-hand frame page to the
|
* Adds "All Packages" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
|
||||||
allpackagesLabel, "", "packageListFrame");
|
allpackagesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -93,21 +93,27 @@ public class ProfilePackageFrameWriter extends HtmlDocletWriter {
|
|||||||
winTitle.append(sep);
|
winTitle.append(sep);
|
||||||
String pkgName = configuration.utils.getPackageName(packageDoc);
|
String pkgName = configuration.utils.getPackageName(packageDoc);
|
||||||
winTitle.append(pkgName);
|
winTitle.append(pkgName);
|
||||||
Content body = profpackgen.getBody(false,
|
HtmlTree body = profpackgen.getBody(false,
|
||||||
profpackgen.getWindowTitle(winTitle.toString()));
|
profpackgen.getWindowTitle(winTitle.toString()));
|
||||||
Content profName = new StringContent(profileName);
|
Content profName = new StringContent(profileName);
|
||||||
Content sepContent = new StringContent(sep);
|
Content sepContent = new StringContent(sep);
|
||||||
Content pkgNameContent = new RawHtml(pkgName);
|
Content pkgNameContent = new RawHtml(pkgName);
|
||||||
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
|
||||||
|
? HtmlTree.MAIN()
|
||||||
|
: body;
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
|
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
|
||||||
profpackgen.getTargetProfileLink("classFrame", profName, profileName));
|
profpackgen.getTargetProfileLink("classFrame", profName, profileName));
|
||||||
heading.addContent(sepContent);
|
heading.addContent(sepContent);
|
||||||
heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc,
|
heading.addContent(profpackgen.getTargetProfilePackageLink(packageDoc,
|
||||||
"classFrame", pkgNameContent, profileName));
|
"classFrame", pkgNameContent, profileName));
|
||||||
body.addContent(heading);
|
htmlTree.addContent(heading);
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.indexContainer);
|
div.addStyle(HtmlStyle.indexContainer);
|
||||||
profpackgen.addClassListing(div, profileValue);
|
profpackgen.addClassListing(div, profileValue);
|
||||||
body.addContent(div);
|
htmlTree.addContent(div);
|
||||||
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
profpackgen.printHtmlDocument(
|
profpackgen.printHtmlDocument(
|
||||||
configuration.metakeywords.getMetaKeywords(packageDoc), false, body);
|
configuration.metakeywords.getMetaKeywords(packageDoc), false, body);
|
||||||
profpackgen.close();
|
profpackgen.close();
|
||||||
@ -127,7 +133,7 @@ public class ProfilePackageFrameWriter extends HtmlDocletWriter {
|
|||||||
* @param contentTree the content tree to which the listing will be added
|
* @param contentTree the content tree to which the listing will be added
|
||||||
* @param profileValue the value of the profile being documented
|
* @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()) {
|
if (packageDoc.isIncluded()) {
|
||||||
addClassKindListing(packageDoc.interfaces(),
|
addClassKindListing(packageDoc.interfaces(),
|
||||||
getResource("doclet.Interfaces"), contentTree, profileValue);
|
getResource("doclet.Interfaces"), contentTree, profileValue);
|
||||||
@ -153,10 +159,13 @@ public class ProfilePackageFrameWriter extends HtmlDocletWriter {
|
|||||||
* @param profileValue the value of the profile being documented
|
* @param profileValue the value of the profile being documented
|
||||||
*/
|
*/
|
||||||
protected void addClassKindListing(ClassDoc[] arr, Content labelContent,
|
protected void addClassKindListing(ClassDoc[] arr, Content labelContent,
|
||||||
Content contentTree, int profileValue) {
|
HtmlTree contentTree, int profileValue) {
|
||||||
if(arr.length > 0) {
|
if(arr.length > 0) {
|
||||||
Arrays.sort(arr);
|
Arrays.sort(arr);
|
||||||
boolean printedHeader = false;
|
boolean printedHeader = false;
|
||||||
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
|
||||||
|
? HtmlTree.SECTION()
|
||||||
|
: contentTree;
|
||||||
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.setTitle(labelContent);
|
ul.setTitle(labelContent);
|
||||||
for (ClassDoc classDoc : arr) {
|
for (ClassDoc classDoc : arr) {
|
||||||
@ -170,7 +179,7 @@ public class ProfilePackageFrameWriter extends HtmlDocletWriter {
|
|||||||
if (!printedHeader) {
|
if (!printedHeader) {
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
true, labelContent);
|
true, labelContent);
|
||||||
contentTree.addContent(heading);
|
htmlTree.addContent(heading);
|
||||||
printedHeader = true;
|
printedHeader = true;
|
||||||
}
|
}
|
||||||
Content arr_i_name = new StringContent(classDoc.name());
|
Content arr_i_name = new StringContent(classDoc.name());
|
||||||
@ -181,7 +190,10 @@ public class ProfilePackageFrameWriter extends HtmlDocletWriter {
|
|||||||
Content li = HtmlTree.LI(link);
|
Content li = HtmlTree.LI(link);
|
||||||
ul.addContent(li);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
contentTree.addContent(ul);
|
htmlTree.addContent(ul);
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -90,7 +90,9 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
getTargetProfileLink("classFrame", profNameContent, profileName));
|
getTargetProfileLink("classFrame", profNameContent, profileName));
|
||||||
heading.addContent(getSpace());
|
heading.addContent(getSpace());
|
||||||
heading.addContent(packagesLabel);
|
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);
|
HtmlTree ul = new HtmlTree(HtmlTag.UL);
|
||||||
ul.setTitle(packagesLabel);
|
ul.setTitle(packagesLabel);
|
||||||
List<PackageDoc> packages = configuration.profilePackages.get(profileName);
|
List<PackageDoc> packages = configuration.profilePackages.get(profileName);
|
||||||
@ -99,8 +101,8 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
ul.addContent(getPackage(packageDoc, profileName));
|
ul.addContent(getPackage(packageDoc, profileName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.addContent(ul);
|
htmlTree.addContent(ul);
|
||||||
body.addContent(div);
|
body.addContent(htmlTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -156,39 +158,39 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
* Adds "All Classes" link for the top of the left-hand frame page to the
|
* Adds "All Classes" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
|
||||||
allclassesLabel, "", "packageFrame");
|
allclassesLabel, "", "packageFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds "All Packages" link for the top of the left-hand frame page to the
|
* Adds "All Packages" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
|
||||||
allpackagesLabel, "", "packageListFrame");
|
allpackagesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds "All Profiles" link for the top of the left-hand frame page to the
|
* Adds "All Profiles" link for the top of the left-hand frame page to the
|
||||||
* documentation tree.
|
* 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,
|
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
|
||||||
allprofilesLabel, "", "packageListFrame");
|
allprofilesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content li = HtmlTree.LI(linkContent);
|
||||||
div.addContent(span);
|
ul.addContent(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -73,6 +73,16 @@ public class ProfilePackageWriterImpl extends HtmlDocletWriter
|
|||||||
*/
|
*/
|
||||||
protected int profileValue;
|
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
|
* Constructor to construct ProfilePackageWriter object and to generate
|
||||||
* "profilename-package-summary.html" file in the respective package directory.
|
* "profilename-package-summary.html" file in the respective package directory.
|
||||||
@ -103,9 +113,15 @@ public class ProfilePackageWriterImpl extends HtmlDocletWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getPackageHeader(String heading) {
|
public Content getPackageHeader(String heading) {
|
||||||
Content bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.header);
|
div.addStyle(HtmlStyle.header);
|
||||||
Content profileContent = new StringContent(profileName);
|
Content profileContent = new StringContent(profileName);
|
||||||
@ -133,7 +149,11 @@ public class ProfilePackageWriterImpl extends HtmlDocletWriter
|
|||||||
Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
|
Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
|
||||||
div.addContent(descPara);
|
div.addContent(descPara);
|
||||||
}
|
}
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,9 +219,14 @@ public class ProfilePackageWriterImpl extends HtmlDocletWriter
|
|||||||
Content h2Content = new StringContent(
|
Content h2Content = new StringContent(
|
||||||
configuration.getText("doclet.Package_Description",
|
configuration.getText("doclet.Package_Description",
|
||||||
packageDoc.name()));
|
packageDoc.name()));
|
||||||
packageContentTree.addContent(HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING,
|
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content);
|
||||||
true, h2Content));
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
addInlineComment(packageDoc, packageContentTree);
|
sectionTree.addContent(heading);
|
||||||
|
addInlineComment(packageDoc, sectionTree);
|
||||||
|
} else {
|
||||||
|
packageContentTree.addContent(heading);
|
||||||
|
addInlineComment(packageDoc, packageContentTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,15 +234,37 @@ public class ProfilePackageWriterImpl extends HtmlDocletWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addPackageTags(Content packageContentTree) {
|
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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addPackageFooter(Content contentTree) {
|
public void addPackageFooter(Content contentTree) {
|
||||||
addNavLinks(false, contentTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(contentTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: contentTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -64,6 +64,11 @@ public class ProfileWriterImpl extends HtmlDocletWriter
|
|||||||
*/
|
*/
|
||||||
protected Profile profile;
|
protected Profile profile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The HTML tree for main tag.
|
||||||
|
*/
|
||||||
|
protected HtmlTree mainTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor to construct ProfileWriter object and to generate
|
* Constructor to construct ProfileWriter object and to generate
|
||||||
* "profileName-summary.html" file.
|
* "profileName-summary.html" file.
|
||||||
@ -87,9 +92,15 @@ public class ProfileWriterImpl extends HtmlDocletWriter
|
|||||||
*/
|
*/
|
||||||
public Content getProfileHeader(String heading) {
|
public Content getProfileHeader(String heading) {
|
||||||
String profileName = profile.name;
|
String profileName = profile.name;
|
||||||
Content bodyTree = getBody(true, getWindowTitle(profileName));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(profileName));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
HtmlTree div = new HtmlTree(HtmlTag.DIV);
|
||||||
div.addStyle(HtmlStyle.header);
|
div.addStyle(HtmlStyle.header);
|
||||||
Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
||||||
@ -98,7 +109,11 @@ public class ProfileWriterImpl extends HtmlDocletWriter
|
|||||||
Content profileHead = new RawHtml(heading);
|
Content profileHead = new RawHtml(heading);
|
||||||
tHeading.addContent(profileHead);
|
tHeading.addContent(profileHead);
|
||||||
div.addContent(tHeading);
|
div.addContent(tHeading);
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,20 +148,29 @@ public class ProfileWriterImpl extends HtmlDocletWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getPackageSummaryHeader(PackageDoc pkg) {
|
public Content getPackageSummaryHeader(PackageDoc pkg) {
|
||||||
Content pkgName = getTargetProfilePackageLink(pkg,
|
Content pkgName = new StringContent(pkg.name());
|
||||||
"classFrame", new StringContent(pkg.name()), profile.name);
|
Content pkgNameLink = getTargetProfilePackageLink(pkg,
|
||||||
Content heading = HtmlTree.HEADING(HtmlTag.H3, pkgName);
|
"classFrame", pkgName, profile.name);
|
||||||
HtmlTree li = HtmlTree.LI(HtmlStyle.blockList, heading);
|
Content heading = HtmlTree.HEADING(HtmlTag.H3, pkgNameLink);
|
||||||
addPackageDeprecationInfo(li, pkg);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
|
||||||
return li;
|
? HtmlTree.SECTION(heading)
|
||||||
|
: HtmlTree.LI(HtmlStyle.blockList, heading);
|
||||||
|
addPackageDeprecationInfo(htmlTree, pkg);
|
||||||
|
return htmlTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getPackageSummaryTree(Content packageSummaryContentTree) {
|
public Content getPackageSummaryTree(Content packageSummaryContentTree) {
|
||||||
HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList, packageSummaryContentTree);
|
HtmlTree htmlTree;
|
||||||
return ul;
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
htmlTree = HtmlTree.UL(HtmlStyle.blockList,
|
||||||
|
HtmlTree.LI(HtmlStyle.blockList, packageSummaryContentTree));
|
||||||
|
} else {
|
||||||
|
htmlTree = HtmlTree.UL(HtmlStyle.blockList, packageSummaryContentTree);
|
||||||
|
}
|
||||||
|
return htmlTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -158,12 +182,30 @@ public class ProfileWriterImpl extends HtmlDocletWriter
|
|||||||
packageSummaryContentTree, profile.value);
|
packageSummaryContentTree, profile.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addProfileContent(Content contentTree, Content profileContentTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(profileContentTree);
|
||||||
|
contentTree.addContent(mainTree);
|
||||||
|
} else {
|
||||||
|
contentTree.addContent(profileContentTree);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public void addProfileFooter(Content contentTree) {
|
public void addProfileFooter(Content contentTree) {
|
||||||
addNavLinks(false, contentTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(contentTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: contentTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
contentTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -63,6 +63,13 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
|||||||
return memberTree;
|
return memberTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
|
||||||
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -157,6 +164,10 @@ public class PropertyWriterImpl extends AbstractMemberWriter
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public Content getPropertyDetails(Content propertyDetailsTree) {
|
public Content getPropertyDetails(Content propertyDetailsTree) {
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(propertyDetailsTree));
|
||||||
|
return htmlTree;
|
||||||
|
}
|
||||||
return getMemberTree(propertyDetailsTree);
|
return getMemberTree(propertyDetailsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -27,6 +27,7 @@ package com.sun.tools.doclets.formats.html;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import com.sun.javadoc.*;
|
import com.sun.javadoc.*;
|
||||||
import com.sun.tools.doclets.formats.html.markup.*;
|
import com.sun.tools.doclets.formats.html.markup.*;
|
||||||
import com.sun.tools.doclets.internal.toolkit.*;
|
import com.sun.tools.doclets.internal.toolkit.*;
|
||||||
@ -48,6 +49,11 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
|||||||
|
|
||||||
List<ClassDoc> visibleClasses;
|
List<ClassDoc> visibleClasses;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HTML tree for main tag.
|
||||||
|
*/
|
||||||
|
private HtmlTree mainTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param configuration the configuration data for the doclet
|
* @param configuration the configuration data for the doclet
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
@ -66,14 +72,24 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
|||||||
* @return the body content tree
|
* @return the body content tree
|
||||||
*/
|
*/
|
||||||
public Content getHeader(String header) {
|
public Content getHeader(String header) {
|
||||||
Content bodyTree = getBody(true, getWindowTitle(header));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(header));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
Content h1Content = new StringContent(header);
|
Content h1Content = new StringContent(header);
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
|
||||||
HtmlStyle.title, h1Content);
|
HtmlStyle.title, h1Content);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||||
bodyTree.addContent(div);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
|
mainTree.addContent(div);
|
||||||
|
} else {
|
||||||
|
bodyTree.addContent(div);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,9 +110,14 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
|||||||
* @return the package serialized form header tree
|
* @return the package serialized form header tree
|
||||||
*/
|
*/
|
||||||
public Content getPackageSerializedHeader() {
|
public Content getPackageSerializedHeader() {
|
||||||
HtmlTree li = new HtmlTree(HtmlTag.LI);
|
HtmlTree htmlTree;
|
||||||
li.addStyle(HtmlStyle.blockList);
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
return li;
|
htmlTree = HtmlTree.SECTION();
|
||||||
|
} else {
|
||||||
|
htmlTree = new HtmlTree(HtmlTag.LI);
|
||||||
|
htmlTree.addStyle(HtmlStyle.blockList);
|
||||||
|
}
|
||||||
|
return htmlTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -211,9 +232,24 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
|||||||
* @return a div content tree
|
* @return a div content tree
|
||||||
*/
|
*/
|
||||||
public Content getSerializedContent(Content serializedTreeContent) {
|
public Content getSerializedContent(Content serializedTreeContent) {
|
||||||
Content divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
|
HtmlTree divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
|
||||||
serializedTreeContent);
|
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 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
|||||||
* @param serializedTree the serialized tree to be added
|
* @param serializedTree the serialized tree to be added
|
||||||
*/
|
*/
|
||||||
public void addFooter(Content serializedTree) {
|
public void addFooter(Content serializedTree) {
|
||||||
addNavLinks(false, serializedTree);
|
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
|
||||||
addBottom(serializedTree);
|
? HtmlTree.FOOTER()
|
||||||
|
: serializedTree;
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
serializedTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -89,9 +89,15 @@ public class SingleIndexWriter extends AbstractIndexWriter {
|
|||||||
*/
|
*/
|
||||||
protected void generateIndexFile() throws IOException {
|
protected void generateIndexFile() throws IOException {
|
||||||
String title = configuration.getText("doclet.Window_Single_Index");
|
String title = configuration.getText("doclet.Window_Single_Index");
|
||||||
Content body = getBody(true, getWindowTitle(title));
|
HtmlTree body = getBody(true, getWindowTitle(title));
|
||||||
addTop(body);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, body);
|
? HtmlTree.HEADER()
|
||||||
|
: body;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||||
divTree.addStyle(HtmlStyle.contentContainer);
|
divTree.addStyle(HtmlStyle.contentContainer);
|
||||||
addLinksForIndexes(divTree);
|
addLinksForIndexes(divTree);
|
||||||
@ -100,9 +106,17 @@ public class SingleIndexWriter extends AbstractIndexWriter {
|
|||||||
addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
|
addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
|
||||||
}
|
}
|
||||||
addLinksForIndexes(divTree);
|
addLinksForIndexes(divTree);
|
||||||
body.addContent(divTree);
|
body.addContent((configuration.allowTag(HtmlTag.MAIN))
|
||||||
addNavLinks(false, body);
|
? HtmlTree.MAIN(divTree)
|
||||||
addBottom(body);
|
: 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);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -176,7 +176,7 @@ public class SourceToHTMLConverter {
|
|||||||
}
|
}
|
||||||
addBlankLines(pre);
|
addBlankLines(pre);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, 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)));
|
writeToFile(body, outputdir.resolve(DocPath.forClass(cd)));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -190,7 +190,9 @@ public class SourceToHTMLConverter {
|
|||||||
* @param path the path for the file.
|
* @param path the path for the file.
|
||||||
*/
|
*/
|
||||||
private void writeToFile(Content body, DocPath path) throws IOException {
|
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);
|
Content head = new HtmlTree(HtmlTag.HEAD);
|
||||||
head.addContent(HtmlTree.TITLE(new StringContent(
|
head.addContent(HtmlTree.TITLE(new StringContent(
|
||||||
configuration.getText("doclet.Window_Source_title"))));
|
configuration.getText("doclet.Window_Source_title"))));
|
||||||
@ -262,8 +264,8 @@ public class SourceToHTMLConverter {
|
|||||||
*/
|
*/
|
||||||
private void addLine(Content pre, String line, int currentLineNo) {
|
private void addLine(Content pre, String line, int currentLineNo) {
|
||||||
if (line != null) {
|
if (line != null) {
|
||||||
pre.addContent(utils.replaceTabs(configuration, line));
|
Content anchor = HtmlTree.A_ID("line." + Integer.toString(currentLineNo),
|
||||||
Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo));
|
new StringContent(utils.replaceTabs(configuration, line)));
|
||||||
pre.addContent(anchor);
|
pre.addContent(anchor);
|
||||||
pre.addContent(NEW_LINE);
|
pre.addContent(NEW_LINE);
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -116,17 +116,29 @@ public class SplitIndexWriter extends AbstractIndexWriter {
|
|||||||
protected void generateIndexFile(Character unicode) throws IOException {
|
protected void generateIndexFile(Character unicode) throws IOException {
|
||||||
String title = configuration.getText("doclet.Window_Split_Index",
|
String title = configuration.getText("doclet.Window_Split_Index",
|
||||||
unicode.toString());
|
unicode.toString());
|
||||||
Content body = getBody(true, getWindowTitle(title));
|
HtmlTree body = getBody(true, getWindowTitle(title));
|
||||||
addTop(body);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, body);
|
? HtmlTree.HEADER()
|
||||||
|
: body;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||||
divTree.addStyle(HtmlStyle.contentContainer);
|
divTree.addStyle(HtmlStyle.contentContainer);
|
||||||
addLinksForIndexes(divTree);
|
addLinksForIndexes(divTree);
|
||||||
addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
|
addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
|
||||||
addLinksForIndexes(divTree);
|
addLinksForIndexes(divTree);
|
||||||
body.addContent(divTree);
|
body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(divTree) : divTree);
|
||||||
addNavLinks(false, body);
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
addBottom(body);
|
htmlTree = HtmlTree.FOOTER();
|
||||||
|
}
|
||||||
|
addNavLinks(false, htmlTree);
|
||||||
|
addBottom(htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.FOOTER)) {
|
||||||
|
body.addContent(htmlTree);
|
||||||
|
}
|
||||||
printHtmlDocument(null, true, body);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -55,6 +55,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
|
|||||||
*/
|
*/
|
||||||
public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The HTML tree for main tag.
|
||||||
|
*/
|
||||||
|
protected HtmlTree mainTree = HtmlTree.MAIN();
|
||||||
|
|
||||||
public SubWriterHolderWriter(ConfigurationImpl configuration, DocPath filename)
|
public SubWriterHolderWriter(ConfigurationImpl configuration, DocPath filename)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
super(configuration, filename);
|
super(configuration, filename);
|
||||||
@ -92,8 +97,9 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
|||||||
else {
|
else {
|
||||||
caption = getTableCaption(mw.getCaption());
|
caption = getTableCaption(mw.getCaption());
|
||||||
}
|
}
|
||||||
Content table = HtmlTree.TABLE(HtmlStyle.memberSummary, 0, 3, 0,
|
Content table = (configuration.isOutputHtml5())
|
||||||
mw.getTableSummary(), caption);
|
? HtmlTree.TABLE(HtmlStyle.memberSummary, caption)
|
||||||
|
: HtmlTree.TABLE(HtmlStyle.memberSummary, mw.getTableSummary(), caption);
|
||||||
table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col"));
|
table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col"));
|
||||||
for (Content tableContent : tableContents) {
|
for (Content tableContent : tableContents) {
|
||||||
table.addContent(tableContent);
|
table.addContent(tableContent);
|
||||||
@ -260,6 +266,31 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
|||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Get the member header tree
|
||||||
*
|
*
|
||||||
@ -271,6 +302,21 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
|||||||
return li;
|
return li;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Get the member tree
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -101,22 +101,36 @@ public class TreeWriter extends AbstractTreeWriter {
|
|||||||
* Generate the interface hierarchy and class hierarchy.
|
* Generate the interface hierarchy and class hierarchy.
|
||||||
*/
|
*/
|
||||||
public void generateTreeFile() throws IOException {
|
public void generateTreeFile() throws IOException {
|
||||||
Content body = getTreeHeader();
|
HtmlTree body = getTreeHeader();
|
||||||
Content headContent = getResource("doclet.Hierarchy_For_All_Packages");
|
Content headContent = getResource("doclet.Hierarchy_For_All_Packages");
|
||||||
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
|
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
|
||||||
HtmlStyle.title, headContent);
|
HtmlStyle.title, headContent);
|
||||||
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
|
||||||
addPackageTreeLinks(div);
|
addPackageTreeLinks(div);
|
||||||
body.addContent(div);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
|
||||||
|
? HtmlTree.MAIN()
|
||||||
|
: body;
|
||||||
|
htmlTree.addContent(div);
|
||||||
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
|
||||||
divTree.addStyle(HtmlStyle.contentContainer);
|
divTree.addStyle(HtmlStyle.contentContainer);
|
||||||
addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
|
addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
|
||||||
addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
|
addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
|
||||||
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
|
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
|
||||||
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
|
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
|
||||||
body.addContent(divTree);
|
htmlTree.addContent(divTree);
|
||||||
addNavLinks(false, body);
|
if (configuration.allowTag(HtmlTag.MAIN)) {
|
||||||
addBottom(body);
|
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);
|
printHtmlDocument(null, true, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,11 +178,17 @@ public class TreeWriter extends AbstractTreeWriter {
|
|||||||
*
|
*
|
||||||
* @return a content tree for the tree header
|
* @return a content tree for the tree header
|
||||||
*/
|
*/
|
||||||
protected Content getTreeHeader() {
|
protected HtmlTree getTreeHeader() {
|
||||||
String title = configuration.getText("doclet.Window_Class_Hierarchy");
|
String title = configuration.getText("doclet.Window_Class_Hierarchy");
|
||||||
Content bodyTree = getBody(true, getWindowTitle(title));
|
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
|
||||||
addTop(bodyTree);
|
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||||
addNavLinks(true, bodyTree);
|
? HtmlTree.HEADER()
|
||||||
|
: bodyTree;
|
||||||
|
addTop(htmlTree);
|
||||||
|
addNavLinks(true, htmlTree);
|
||||||
|
if (configuration.allowTag(HtmlTag.HEADER)) {
|
||||||
|
bodyTree.addContent(htmlTree);
|
||||||
|
}
|
||||||
return bodyTree;
|
return bodyTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,16 +48,26 @@ public class DocType extends Content {
|
|||||||
public static final DocType TRANSITIONAL =
|
public static final DocType TRANSITIONAL =
|
||||||
new DocType("Transitional", "http://www.w3.org/TR/html4/loose.dtd");
|
new DocType("Transitional", "http://www.w3.org/TR/html4/loose.dtd");
|
||||||
|
|
||||||
|
public static final DocType HTML5 = new DocType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor to construct a DocType object.
|
* Constructor to construct a DocType object.
|
||||||
*
|
*
|
||||||
* @param type the doctype to be added
|
* @param type the doctype to be added
|
||||||
|
* @param dtd the dtd of the doctype
|
||||||
*/
|
*/
|
||||||
private DocType(String type, String dtd) {
|
private DocType(String type, String dtd) {
|
||||||
docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " + type +
|
docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " + type +
|
||||||
"//EN\" \"" + dtd + "\">" + DocletConstants.NL;
|
"//EN\" \"" + dtd + "\">" + DocletConstants.NL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor to construct a DocType object.
|
||||||
|
*/
|
||||||
|
private DocType() {
|
||||||
|
docType = "<!DOCTYPE HTML>" + DocletConstants.NL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is not supported by the class.
|
* This method is not supported by the class.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,9 +39,6 @@ import com.sun.tools.javac.util.StringUtils;
|
|||||||
*/
|
*/
|
||||||
public enum HtmlAttr {
|
public enum HtmlAttr {
|
||||||
ALT,
|
ALT,
|
||||||
BORDER,
|
|
||||||
CELLPADDING,
|
|
||||||
CELLSPACING,
|
|
||||||
CLASS,
|
CLASS,
|
||||||
CLEAR,
|
CLEAR,
|
||||||
COLS,
|
COLS,
|
||||||
@ -53,6 +50,7 @@ public enum HtmlAttr {
|
|||||||
NAME,
|
NAME,
|
||||||
ONLOAD,
|
ONLOAD,
|
||||||
REL,
|
REL,
|
||||||
|
ROLE,
|
||||||
ROWS,
|
ROWS,
|
||||||
SCOPE,
|
SCOPE,
|
||||||
SCROLLING,
|
SCROLLING,
|
||||||
@ -65,6 +63,25 @@ public enum HtmlAttr {
|
|||||||
|
|
||||||
private final String value;
|
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() {
|
HtmlAttr() {
|
||||||
this.value = StringUtils.toLowerCase(name());
|
this.value = StringUtils.toLowerCase(name());
|
||||||
}
|
}
|
||||||
|
@ -307,11 +307,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
|||||||
*
|
*
|
||||||
* @param title Title of this HTML document
|
* @param title Title of this HTML document
|
||||||
* @param configuration the configuration object
|
* @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,
|
public void printFramesDocument(String title, ConfigurationImpl configuration,
|
||||||
HtmlTree body) throws IOException {
|
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 htmlComment = new Comment(configuration.getText("doclet.New_Page"));
|
||||||
Content head = new HtmlTree(HtmlTag.HEAD);
|
Content head = new HtmlTree(HtmlTag.HEAD);
|
||||||
head.addContent(getGeneratedBy(!configuration.notimestamp));
|
head.addContent(getGeneratedBy(!configuration.notimestamp));
|
||||||
|
@ -44,6 +44,7 @@ public enum HtmlStyle {
|
|||||||
blockList,
|
blockList,
|
||||||
blockListLast,
|
blockListLast,
|
||||||
bottomNav,
|
bottomNav,
|
||||||
|
circle,
|
||||||
classUseContainer,
|
classUseContainer,
|
||||||
colFirst,
|
colFirst,
|
||||||
colLast,
|
colLast,
|
||||||
@ -64,7 +65,7 @@ public enum HtmlStyle {
|
|||||||
horizontal,
|
horizontal,
|
||||||
footer,
|
footer,
|
||||||
indexContainer,
|
indexContainer,
|
||||||
indexHeader,
|
indexNav,
|
||||||
inheritance,
|
inheritance,
|
||||||
interfaceName,
|
interfaceName,
|
||||||
leftContainer,
|
leftContainer,
|
||||||
|
@ -43,15 +43,16 @@ public enum HtmlTag {
|
|||||||
BODY(BlockType.OTHER, EndTag.END),
|
BODY(BlockType.OTHER, EndTag.END),
|
||||||
BR(BlockType.INLINE, EndTag.NOEND),
|
BR(BlockType.INLINE, EndTag.NOEND),
|
||||||
CAPTION,
|
CAPTION,
|
||||||
CENTER,
|
CENTER(HtmlVersion.HTML4),
|
||||||
CODE(BlockType.INLINE, EndTag.END),
|
CODE(BlockType.INLINE, EndTag.END),
|
||||||
DD,
|
DD,
|
||||||
DIR,
|
DIR(HtmlVersion.HTML4),
|
||||||
DIV,
|
DIV,
|
||||||
DL,
|
DL,
|
||||||
DT,
|
DT,
|
||||||
EM(BlockType.INLINE, EndTag.END),
|
EM(BlockType.INLINE, EndTag.END),
|
||||||
FONT(BlockType.INLINE, EndTag.END),
|
FONT(HtmlVersion.HTML4, BlockType.INLINE, EndTag.END),
|
||||||
|
FOOTER(HtmlVersion.HTML5),
|
||||||
H1,
|
H1,
|
||||||
H2,
|
H2,
|
||||||
H3,
|
H3,
|
||||||
@ -59,6 +60,7 @@ public enum HtmlTag {
|
|||||||
H5,
|
H5,
|
||||||
H6,
|
H6,
|
||||||
HEAD(BlockType.OTHER, EndTag.END),
|
HEAD(BlockType.OTHER, EndTag.END),
|
||||||
|
HEADER(HtmlVersion.HTML5),
|
||||||
HR(BlockType.BLOCK, EndTag.NOEND),
|
HR(BlockType.BLOCK, EndTag.NOEND),
|
||||||
HTML(BlockType.OTHER, EndTag.END),
|
HTML(BlockType.OTHER, EndTag.END),
|
||||||
I(BlockType.INLINE, EndTag.END),
|
I(BlockType.INLINE, EndTag.END),
|
||||||
@ -67,14 +69,16 @@ public enum HtmlTag {
|
|||||||
LI,
|
LI,
|
||||||
LISTING,
|
LISTING,
|
||||||
LINK(BlockType.OTHER, EndTag.NOEND),
|
LINK(BlockType.OTHER, EndTag.NOEND),
|
||||||
|
MAIN(HtmlVersion.HTML5),
|
||||||
MENU,
|
MENU,
|
||||||
META(BlockType.OTHER, EndTag.NOEND),
|
META(BlockType.OTHER, EndTag.NOEND),
|
||||||
NOFRAMES(BlockType.OTHER, EndTag.END),
|
NAV(HtmlVersion.HTML5),
|
||||||
NOSCRIPT(BlockType.OTHER, EndTag.END),
|
NOSCRIPT(BlockType.OTHER, EndTag.END),
|
||||||
OL,
|
OL,
|
||||||
P,
|
P,
|
||||||
PRE,
|
PRE,
|
||||||
SCRIPT(BlockType.OTHER, EndTag.END),
|
SCRIPT(BlockType.OTHER, EndTag.END),
|
||||||
|
SECTION(HtmlVersion.HTML5),
|
||||||
SMALL(BlockType.INLINE, EndTag.END),
|
SMALL(BlockType.INLINE, EndTag.END),
|
||||||
SPAN(BlockType.INLINE, EndTag.END),
|
SPAN(BlockType.INLINE, EndTag.END),
|
||||||
STRONG(BlockType.INLINE, EndTag.END),
|
STRONG(BlockType.INLINE, EndTag.END),
|
||||||
@ -85,12 +89,13 @@ public enum HtmlTag {
|
|||||||
TH,
|
TH,
|
||||||
TITLE(BlockType.OTHER, EndTag.END),
|
TITLE(BlockType.OTHER, EndTag.END),
|
||||||
TR,
|
TR,
|
||||||
TT(BlockType.INLINE, EndTag.END),
|
TT(HtmlVersion.HTML4, BlockType.INLINE, EndTag.END),
|
||||||
UL;
|
UL;
|
||||||
|
|
||||||
public final BlockType blockType;
|
public final BlockType blockType;
|
||||||
public final EndTag endTag;
|
public final EndTag endTag;
|
||||||
public final String value;
|
public final String value;
|
||||||
|
public final HtmlVersion htmlVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum representing the type of HTML element.
|
* Enum representing the type of HTML element.
|
||||||
@ -110,10 +115,19 @@ public enum HtmlTag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HtmlTag() {
|
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 ) {
|
HtmlTag(BlockType blockType, EndTag endTag ) {
|
||||||
|
this(HtmlVersion.ALL, blockType, endTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
HtmlTag(HtmlVersion htmlVersion, BlockType blockType, EndTag endTag ) {
|
||||||
|
this.htmlVersion = htmlVersion;
|
||||||
this.blockType = blockType;
|
this.blockType = blockType;
|
||||||
this.endTag = endTag;
|
this.endTag = endTag;
|
||||||
this.value = StringUtils.toLowerCase(name());
|
this.value = StringUtils.toLowerCase(name());
|
||||||
@ -129,6 +143,16 @@ public enum HtmlTag {
|
|||||||
return (endTag == EndTag.END);
|
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() {
|
public String toString() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ import java.nio.charset.*;
|
|||||||
|
|
||||||
import com.sun.tools.doclets.internal.toolkit.Content;
|
import com.sun.tools.doclets.internal.toolkit.Content;
|
||||||
import com.sun.tools.doclets.internal.toolkit.util.*;
|
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.
|
* Class for generating HTML tree for javadoc output.
|
||||||
@ -87,6 +88,10 @@ public class HtmlTree extends Content {
|
|||||||
addAttr(HtmlAttr.TITLE, stripHtml(body));
|
addAttr(HtmlAttr.TITLE, stripHtml(body));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRole(Role role) {
|
||||||
|
addAttr(HtmlAttr.ROLE, role.toString());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a style for the HTML tag.
|
* Adds a style for the HTML tag.
|
||||||
*
|
*
|
||||||
@ -221,27 +226,16 @@ public class HtmlTree extends Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
* @param body content for the anchor tag
|
||||||
* @return an HtmlTree object
|
* @return an HtmlTree object
|
||||||
*/
|
*/
|
||||||
public static HtmlTree A_NAME(String name, Content body) {
|
public static HtmlTree A_ID(String id, Content body) {
|
||||||
HtmlTree htmltree = HtmlTree.A_NAME(name);
|
|
||||||
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 htmltree = new HtmlTree(HtmlTag.A);
|
||||||
htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
|
htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
|
||||||
|
htmltree.addContent(nullCheck(body));
|
||||||
return htmltree;
|
return htmltree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,18 +320,24 @@ public class HtmlTree extends Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a IFRAME tag.
|
* Generates a FOOTER tag with role attribute.
|
||||||
*
|
*
|
||||||
* @param src the url of the document to be shown in the frame
|
* @return an HtmlTree object for the FOOTER tag
|
||||||
* @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) {
|
public static HtmlTree FOOTER() {
|
||||||
HtmlTree htmltree = new HtmlTree(HtmlTag.IFRAME);
|
HtmlTree htmltree = new HtmlTree(HtmlTag.FOOTER);
|
||||||
htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
|
htmltree.setRole(Role.CONTENTINFO);
|
||||||
htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
|
return htmltree;
|
||||||
htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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;
|
return htmltree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,6 +413,22 @@ public class HtmlTree extends Content {
|
|||||||
return htmltree;
|
return htmltree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Generates a LI tag with some content.
|
||||||
*
|
*
|
||||||
@ -455,6 +471,44 @@ public class HtmlTree extends Content {
|
|||||||
return htmltree;
|
return htmltree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Generates a META tag with the http-equiv, content and charset attributes.
|
||||||
*
|
*
|
||||||
@ -485,6 +539,17 @@ public class HtmlTree extends Content {
|
|||||||
return htmltree;
|
return htmltree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Generates a NOSCRIPT tag with some content.
|
||||||
*
|
*
|
||||||
@ -527,13 +592,46 @@ public class HtmlTree extends Content {
|
|||||||
* @param src the path for the script
|
* @param src the path for the script
|
||||||
* @return an HtmlTree object for the SCRIPT tag
|
* @return an HtmlTree object for the SCRIPT tag
|
||||||
*/
|
*/
|
||||||
public static HtmlTree SCRIPT(String type, String src) {
|
public static HtmlTree SCRIPT(String src) {
|
||||||
HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT);
|
HtmlTree htmltree = HtmlTree.SCRIPT();
|
||||||
htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type));
|
|
||||||
htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
|
htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
|
||||||
return htmltree;
|
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, "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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a SMALL tag with some content.
|
* Generates a SMALL tag with some content.
|
||||||
*
|
*
|
||||||
@ -587,29 +685,36 @@ public class HtmlTree extends Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a Table tag with style class, border, cell padding,
|
* Generates a Table tag with style class and summary attributes and some content.
|
||||||
* cellspacing and summary attributes and some content.
|
|
||||||
*
|
*
|
||||||
* @param styleClass style of the table
|
* @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 summary summary for the table
|
||||||
* @param body content for the table
|
* @param body content for the table
|
||||||
* @return an HtmlTree object for the TABLE tag
|
* @return an HtmlTree object for the TABLE tag
|
||||||
*/
|
*/
|
||||||
public static HtmlTree TABLE(HtmlStyle styleClass, int border, int cellPadding,
|
public static HtmlTree TABLE(HtmlStyle styleClass, String summary, Content body) {
|
||||||
int cellSpacing, String summary, Content body) {
|
|
||||||
HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
|
HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
|
||||||
if (styleClass != null)
|
if (styleClass != null)
|
||||||
htmltree.addStyle(styleClass);
|
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));
|
htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
|
||||||
return htmltree;
|
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.
|
* Generates a TD tag with style class attribute and some content.
|
||||||
*
|
*
|
||||||
@ -741,7 +846,7 @@ public class HtmlTree extends Content {
|
|||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
switch (htmlTag) {
|
switch (htmlTag) {
|
||||||
case A :
|
case A :
|
||||||
return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent()));
|
return (hasAttr(HtmlAttr.ID) || (hasAttr(HtmlAttr.HREF) && hasContent()));
|
||||||
case BR :
|
case BR :
|
||||||
return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));
|
return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));
|
||||||
case IFRAME :
|
case IFRAME :
|
||||||
|
@ -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
|
||||||
|
}
|
@ -306,9 +306,8 @@ public class HtmlWriter {
|
|||||||
* @return an HtmlTree for the SCRIPT tag
|
* @return an HtmlTree for the SCRIPT tag
|
||||||
*/
|
*/
|
||||||
protected HtmlTree getWinTitleScript(){
|
protected HtmlTree getWinTitleScript(){
|
||||||
HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
|
HtmlTree script = HtmlTree.SCRIPT();
|
||||||
if(winTitle != null && winTitle.length() > 0) {
|
if(winTitle != null && winTitle.length() > 0) {
|
||||||
script.addAttr(HtmlAttr.TYPE, "text/javascript");
|
|
||||||
String scriptCode = "<!--" + DocletConstants.NL +
|
String scriptCode = "<!--" + DocletConstants.NL +
|
||||||
" try {" + DocletConstants.NL +
|
" try {" + DocletConstants.NL +
|
||||||
" if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
|
" if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
|
||||||
@ -377,8 +376,7 @@ public class HtmlWriter {
|
|||||||
* @return a content for the SCRIPT tag
|
* @return a content for the SCRIPT tag
|
||||||
*/
|
*/
|
||||||
protected Content getFramesJavaScript() {
|
protected Content getFramesJavaScript() {
|
||||||
HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
|
HtmlTree script = HtmlTree.SCRIPT();
|
||||||
script.addAttr(HtmlAttr.TYPE, "text/javascript");
|
|
||||||
String scriptCode = DocletConstants.NL +
|
String scriptCode = DocletConstants.NL +
|
||||||
" targetPage = \"\" + window.location.search;" + DocletConstants.NL +
|
" targetPage = \"\" + window.location.search;" + DocletConstants.NL +
|
||||||
" if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL +
|
" if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL +
|
||||||
|
@ -192,6 +192,8 @@ doclet.usage=Provided by Standard doclet:\n\
|
|||||||
\ -windowtitle <text> Browser window title for the documentation\n\
|
\ -windowtitle <text> Browser window title for the documentation\n\
|
||||||
\ -doctitle <html-code> Include title for the overview page\n\
|
\ -doctitle <html-code> Include title for the overview page\n\
|
||||||
\ -header <html-code> Include header text for each 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\
|
\ -footer <html-code> Include footer text for each page\n\
|
||||||
\ -top <html-code> Include top 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\
|
\ -bottom <html-code> Include bottom text for each page\n\
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -110,6 +110,14 @@ public interface AnnotationTypeWriter {
|
|||||||
*/
|
*/
|
||||||
public Content getMemberTreeHeader();
|
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.
|
* Get the member tree.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -175,6 +175,14 @@ public interface ClassWriter {
|
|||||||
*/
|
*/
|
||||||
public Content getMemberTreeHeader();
|
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.
|
* Add the footer of the page.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -81,12 +81,12 @@ public interface ConstantsSummaryWriter {
|
|||||||
Set<String> WriteedPackageHeaders, Content contentListTree);
|
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
|
* @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.
|
* Get the constant summaries for the document.
|
||||||
@ -98,16 +98,15 @@ public interface ConstantsSummaryWriter {
|
|||||||
/**
|
/**
|
||||||
* Adds the given package name.
|
* Adds the given package name.
|
||||||
*
|
*
|
||||||
* @param pkg the {@link PackageDoc} to index.
|
|
||||||
* @param parsedPackageName the parsed package name. We only Write the
|
* @param parsedPackageName the parsed package name. We only Write the
|
||||||
* first 2 directory levels of the package
|
* first 2 directory levels of the package
|
||||||
* name. For example, java.lang.ref would be
|
* name. For example, java.lang.ref would be
|
||||||
* indexed as java.lang.*.
|
* 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
|
* be written
|
||||||
*/
|
*/
|
||||||
public abstract void addPackageName(PackageDoc pkg,
|
public abstract void addPackageName(String parsedPackageName, Content summariesTree, boolean first);
|
||||||
String parsedPackageName, Content summariesTree);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the class summary header for the constants summary.
|
* Get the class summary header for the constants summary.
|
||||||
@ -116,6 +115,14 @@ public interface ConstantsSummaryWriter {
|
|||||||
*/
|
*/
|
||||||
public abstract Content getClassConstantHeader();
|
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.
|
* Adds the constant member table to the documentation tree.
|
||||||
*
|
*
|
||||||
@ -127,6 +134,14 @@ public interface ConstantsSummaryWriter {
|
|||||||
public abstract void addConstantMembers(ClassDoc cd, List<FieldDoc> fields,
|
public abstract void addConstantMembers(ClassDoc cd, List<FieldDoc> fields,
|
||||||
Content classConstantTree);
|
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.
|
* Adds the footer for the summary documentation.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -100,14 +100,22 @@ public interface MemberSummaryWriter {
|
|||||||
/**
|
/**
|
||||||
* Get inherited summary links.
|
* 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();
|
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.
|
* 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
|
* @return a content tree for the member
|
||||||
*/
|
*/
|
||||||
public Content getMemberTree(Content memberTree);
|
public Content getMemberTree(Content memberTree);
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -96,6 +96,15 @@ public interface PackageSummaryWriter {
|
|||||||
*/
|
*/
|
||||||
public abstract void addPackageTags(Content packageContentTree);
|
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.
|
* Adds the footer to the documentation tree.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -94,6 +94,15 @@ public interface ProfilePackageSummaryWriter {
|
|||||||
*/
|
*/
|
||||||
public abstract void addPackageTags(Content packageContentTree);
|
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.
|
* Adds the footer to the documentation tree.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -98,6 +98,14 @@ public interface ProfileSummaryWriter {
|
|||||||
public abstract void addClassesSummary(ClassDoc[] classes, String label,
|
public abstract void addClassesSummary(ClassDoc[] classes, String label,
|
||||||
String tableSummary, String[] tableHeader, Content packageSummaryContentTree);
|
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.
|
* Adds the footer to the documentation tree.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -65,6 +65,14 @@ public interface SerializedFormWriter {
|
|||||||
*/
|
*/
|
||||||
public Content getPackageSerializedHeader();
|
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.
|
* Get the given package header.
|
||||||
*
|
*
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -118,7 +118,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
|||||||
" " + annotationTypeDoc.name());
|
" " + annotationTypeDoc.name());
|
||||||
Content annotationContentTree = writer.getAnnotationContentHeader();
|
Content annotationContentTree = writer.getAnnotationContentHeader();
|
||||||
buildChildren(node, annotationContentTree);
|
buildChildren(node, annotationContentTree);
|
||||||
contentTree.addContent(annotationContentTree);
|
writer.addAnnotationContentTree(contentTree, annotationContentTree);
|
||||||
writer.addFooter(contentTree);
|
writer.addFooter(contentTree);
|
||||||
writer.printDocument(contentTree);
|
writer.printDocument(contentTree);
|
||||||
writer.close();
|
writer.close();
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -144,7 +144,7 @@ public class ClassBuilder extends AbstractBuilder {
|
|||||||
classDoc.name());
|
classDoc.name());
|
||||||
Content classContentTree = writer.getClassContentHeader();
|
Content classContentTree = writer.getClassContentHeader();
|
||||||
buildChildren(node, classContentTree);
|
buildChildren(node, classContentTree);
|
||||||
contentTree.addContent(classContentTree);
|
writer.addClassContentTree(contentTree, classContentTree);
|
||||||
writer.addFooter(contentTree);
|
writer.addFooter(contentTree);
|
||||||
writer.printDocument(contentTree);
|
writer.printDocument(contentTree);
|
||||||
writer.close();
|
writer.close();
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -87,6 +87,11 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
|||||||
*/
|
*/
|
||||||
private Content contentTree;
|
private Content contentTree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if first package is listed.
|
||||||
|
*/
|
||||||
|
private boolean first = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new ConstantsSummaryBuilder.
|
* Construct a new ConstantsSummaryBuilder.
|
||||||
*
|
*
|
||||||
@ -159,7 +164,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
|||||||
printedPackageHeaders, contentListTree);
|
printedPackageHeaders, contentListTree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentTree.addContent(writer.getContentsList(contentListTree));
|
writer.addContentsList(contentTree, contentListTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -176,9 +181,10 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
|||||||
currentPackage = aPackage;
|
currentPackage = aPackage;
|
||||||
//Build the documentation for the current package.
|
//Build the documentation for the current package.
|
||||||
buildChildren(node, summariesTree);
|
buildChildren(node, summariesTree);
|
||||||
|
first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentTree.addContent(summariesTree);
|
writer.addConstantSummaries(contentTree, summariesTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -190,8 +196,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
|||||||
public void buildPackageHeader(XMLNode node, Content summariesTree) {
|
public void buildPackageHeader(XMLNode node, Content summariesTree) {
|
||||||
String parsedPackageName = parsePackageName(currentPackage.name());
|
String parsedPackageName = parsePackageName(currentPackage.name());
|
||||||
if (! printedPackageHeaders.contains(parsedPackageName)) {
|
if (! printedPackageHeaders.contains(parsedPackageName)) {
|
||||||
writer.addPackageName(currentPackage,
|
writer.addPackageName(parsePackageName(currentPackage.name()), summariesTree, first);
|
||||||
parsePackageName(currentPackage.name()), summariesTree);
|
|
||||||
printedPackageHeaders.add(parsedPackageName);
|
printedPackageHeaders.add(parsedPackageName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -218,7 +223,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
|||||||
//Build the documentation for the current class.
|
//Build the documentation for the current class.
|
||||||
buildChildren(node, classConstantTree);
|
buildChildren(node, classConstantTree);
|
||||||
}
|
}
|
||||||
summariesTree.addContent(classConstantTree);
|
writer.addClassConstant(summariesTree, classConstantTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -524,7 +524,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
|||||||
for (Content aSummaryTreeList : summaryTreeList) {
|
for (Content aSummaryTreeList : summaryTreeList) {
|
||||||
memberTree.addContent(aSummaryTreeList);
|
memberTree.addContent(aSummaryTreeList);
|
||||||
}
|
}
|
||||||
memberSummaryTree.addContent(writer.getMemberTree(memberTree));
|
writer.addMemberTree(memberSummaryTree, memberTree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -137,7 +137,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
|||||||
public void buildContent(XMLNode node, Content contentTree) {
|
public void buildContent(XMLNode node, Content contentTree) {
|
||||||
Content packageContentTree = packageWriter.getContentHeader();
|
Content packageContentTree = packageWriter.getContentHeader();
|
||||||
buildChildren(node, packageContentTree);
|
buildChildren(node, packageContentTree);
|
||||||
contentTree.addContent(packageContentTree);
|
packageWriter.addPackageContent(contentTree, packageContentTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -153,7 +153,7 @@ public class ProfilePackageSummaryBuilder extends AbstractBuilder {
|
|||||||
public void buildContent(XMLNode node, Content contentTree) {
|
public void buildContent(XMLNode node, Content contentTree) {
|
||||||
Content packageContentTree = profilePackageWriter.getContentHeader();
|
Content packageContentTree = profilePackageWriter.getContentHeader();
|
||||||
buildChildren(node, packageContentTree);
|
buildChildren(node, packageContentTree);
|
||||||
contentTree.addContent(packageContentTree);
|
profilePackageWriter.addPackageContent(contentTree, packageContentTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -142,7 +142,7 @@ public class ProfileSummaryBuilder extends AbstractBuilder {
|
|||||||
public void buildContent(XMLNode node, Content contentTree) {
|
public void buildContent(XMLNode node, Content contentTree) {
|
||||||
Content profileContentTree = profileWriter.getContentHeader();
|
Content profileContentTree = profileWriter.getContentHeader();
|
||||||
buildChildren(node, profileContentTree);
|
buildChildren(node, profileContentTree);
|
||||||
contentTree.addContent(profileContentTree);
|
profileWriter.addProfileContent(contentTree, profileContentTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -190,7 +190,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
buildChildren(node, packageSerializedTree);
|
buildChildren(node, packageSerializedTree);
|
||||||
serializedSummariesTree.addContent(packageSerializedTree);
|
writer.addPackageSerializedTree(serializedSummariesTree, packageSerializedTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -214,14 +214,20 @@ Page header and footer styles
|
|||||||
margin:0 20px;
|
margin:0 20px;
|
||||||
padding:5px 0 0 0;
|
padding:5px 0 0 0;
|
||||||
}
|
}
|
||||||
.indexHeader {
|
.indexNav {
|
||||||
margin:10px;
|
margin:10px;
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
.indexHeader span{
|
.indexNav ul {
|
||||||
margin-right:15px;
|
padding:0;
|
||||||
|
margin:0;
|
||||||
}
|
}
|
||||||
.indexHeader h1 {
|
.indexNav ul li {
|
||||||
|
display:inline;
|
||||||
|
list-style-type:none;
|
||||||
|
padding-right:10px;
|
||||||
|
}
|
||||||
|
.indexNav h1 {
|
||||||
font-size:13px;
|
font-size:13px;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
@ -314,6 +320,9 @@ Page layout container styles
|
|||||||
/*
|
/*
|
||||||
List styles
|
List styles
|
||||||
*/
|
*/
|
||||||
|
li.circle {
|
||||||
|
list-style:circle;
|
||||||
|
}
|
||||||
ul.horizontal li {
|
ul.horizontal li {
|
||||||
display:inline;
|
display:inline;
|
||||||
font-size:0.9em;
|
font-size:0.9em;
|
||||||
@ -370,6 +379,7 @@ Table styles
|
|||||||
*/
|
*/
|
||||||
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
|
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
|
||||||
width:100%;
|
width:100%;
|
||||||
|
border-spacing:0;
|
||||||
border-left:1px solid #EEE;
|
border-left:1px solid #EEE;
|
||||||
border-right:1px solid #EEE;
|
border-right:1px solid #EEE;
|
||||||
border-bottom:1px solid #EEE;
|
border-bottom:1px solid #EEE;
|
||||||
@ -638,3 +648,9 @@ IFRAME specific styles
|
|||||||
overflow:visible;
|
overflow:visible;
|
||||||
margin-bottom:30px;
|
margin-bottom:30px;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
HTML5 specific styles
|
||||||
|
*/
|
||||||
|
main, nav, header, footer, section {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -814,7 +814,7 @@ public class DocEnv {
|
|||||||
return result;
|
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<>();
|
ArrayList<String> doclintOpts = new ArrayList<>();
|
||||||
|
|
||||||
for (String opt: opts) {
|
for (String opt: opts) {
|
||||||
@ -836,6 +836,7 @@ public class DocEnv {
|
|||||||
sep = DocLint.SEPARATOR;
|
sep = DocLint.SEPARATOR;
|
||||||
}
|
}
|
||||||
doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags.toString());
|
doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags.toString());
|
||||||
|
doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + htmlVersion);
|
||||||
|
|
||||||
JavacTask t = BasicJavacTask.instance(context);
|
JavacTask t = BasicJavacTask.instance(context);
|
||||||
doclint = new DocLint();
|
doclint = new DocLint();
|
||||||
|
@ -377,8 +377,9 @@ public class RootDocImpl extends DocImpl implements RootDoc {
|
|||||||
return env.fileManager;
|
return env.fileManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initDocLint(Collection<String> opts, Collection<String> customTagNames) {
|
public void initDocLint(Collection<String> opts, Collection<String> customTagNames,
|
||||||
env.initDoclint(opts, customTagNames);
|
String htmlVersion) {
|
||||||
|
env.initDoclint(opts, customTagNames, htmlVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFunctionalInterface(AnnotationDesc annotationDesc) {
|
public boolean isFunctionalInterface(AnnotationDesc annotationDesc) {
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -49,14 +49,14 @@ public class AccessSkipNav extends JavadocTester {
|
|||||||
checkOutput("p1/C1.html", true,
|
checkOutput("p1/C1.html", true,
|
||||||
// Top navbar <a href>
|
// Top navbar <a href>
|
||||||
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
|
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
|
||||||
// Top navbar <a name>
|
// Top navbar <a id>
|
||||||
"<a name=\"skip.navbar.top\">\n"
|
"<a id=\"skip.navbar.top\">\n"
|
||||||
+ "<!-- -->\n"
|
+ "<!-- -->\n"
|
||||||
+ "</a>",
|
+ "</a>",
|
||||||
// Bottom navbar <a href>
|
// Bottom navbar <a href>
|
||||||
"<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
|
"<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
|
||||||
// Bottom navbar <a name>
|
// Bottom navbar <a id>
|
||||||
"<a name=\"skip.navbar.bottom\">\n"
|
"<a id=\"skip.navbar.bottom\">\n"
|
||||||
+ "<!-- -->\n"
|
+ "<!-- -->\n"
|
||||||
+ "</a>");
|
+ "</a>");
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -53,15 +53,15 @@ public class TestAnchorNames extends JavadocTester {
|
|||||||
|
|
||||||
// Test some section markers and links to these markers
|
// Test some section markers and links to these markers
|
||||||
checkOutput("pkg1/RegClass.html", true,
|
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 href=\"#skip.navbar.top\" title=\"Skip navigation links\">",
|
||||||
"<a name=\"nested.class.summary\">",
|
"<a id=\"nested.class.summary\">",
|
||||||
"<a href=\"#nested.class.summary\">",
|
"<a href=\"#nested.class.summary\">",
|
||||||
"<a name=\"method.summary\">",
|
"<a id=\"method.summary\">",
|
||||||
"<a href=\"#method.summary\">",
|
"<a href=\"#method.summary\">",
|
||||||
"<a name=\"field.detail\">",
|
"<a id=\"field.detail\">",
|
||||||
"<a href=\"#field.detail\">",
|
"<a href=\"#field.detail\">",
|
||||||
"<a name=\"constructor.detail\">",
|
"<a id=\"constructor.detail\">",
|
||||||
"<a href=\"#constructor.detail\">");
|
"<a href=\"#constructor.detail\">");
|
||||||
|
|
||||||
// Test some members and link to these members
|
// Test some members and link to these members
|
||||||
@ -72,59 +72,59 @@ public class TestAnchorNames extends JavadocTester {
|
|||||||
|
|
||||||
// Test some fields
|
// Test some fields
|
||||||
checkOutput("pkg1/RegClass.html", true,
|
checkOutput("pkg1/RegClass.html", true,
|
||||||
"<a name=\"Z:Z_\">",
|
"<a id=\"Z:Z_\">",
|
||||||
"<a href=\"../pkg1/RegClass.html#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 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 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 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 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 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\">");
|
"<a href=\"../pkg1/RegClass.html#method:D:D\">");
|
||||||
|
|
||||||
checkOutput("pkg1/DeprMemClass.html", true,
|
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\">");
|
"<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">");
|
||||||
|
|
||||||
// Test constructor
|
// Test constructor
|
||||||
checkOutput("pkg1/RegClass.html", true,
|
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-\">");
|
"<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">");
|
||||||
|
|
||||||
// Test some methods
|
// Test some methods
|
||||||
checkOutput("pkg1/RegClass.html", true,
|
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 href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">",
|
||||||
"<a name=\"method--\">",
|
"<a id=\"method--\">",
|
||||||
"<a href=\"../pkg1/RegClass.html#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 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 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 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 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-\">");
|
"<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">");
|
||||||
|
|
||||||
checkOutput("pkg1/DeprMemClass.html", true,
|
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--\">");
|
"<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
|
||||||
|
|
||||||
// Test enum
|
// Test enum
|
||||||
checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
|
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\">");
|
"<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">");
|
||||||
|
|
||||||
// Test nested class
|
// Test nested class
|
||||||
checkOutput("pkg1/RegClass._NestedClas$.html", true,
|
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--\">");
|
"<a href=\"../pkg1/RegClass._NestedClas$.html#Z:Z_NestedClas:D--\">");
|
||||||
|
|
||||||
// Test class use page
|
// Test class use page
|
||||||
@ -143,11 +143,11 @@ public class TestAnchorNames extends JavadocTester {
|
|||||||
// Test serialized form page
|
// Test serialized form page
|
||||||
checkOutput("serialized-form.html", true,
|
checkOutput("serialized-form.html", true,
|
||||||
//This is the marker for the link that appears in the pkg1.RegClass.html page
|
//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
|
// Test member name index page
|
||||||
checkOutput("index-all.html", true,
|
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:D\">$",
|
||||||
"<a href=\"#I:Z:Z_\">_");
|
"<a href=\"#I:Z:Z_\">_");
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -47,6 +47,6 @@ public class TestAnnotationOptional extends JavadocTester {
|
|||||||
checkExit(Exit.OK);
|
checkExit(Exit.OK);
|
||||||
|
|
||||||
checkOutput("pkg/AnnotationOptional.html", true,
|
checkOutput("pkg/AnnotationOptional.html", true,
|
||||||
"<a name=\"annotation.type.element.detail\">");
|
"<a id=\"annotation.type.element.detail\">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -50,22 +50,22 @@ public class TestClassTree extends JavadocTester {
|
|||||||
|
|
||||||
checkOutput("pkg/package-tree.html", true,
|
checkOutput("pkg/package-tree.html", true,
|
||||||
"<ul>\n"
|
"<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>",
|
+ "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a>",
|
||||||
"<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n"
|
"<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n"
|
||||||
+ "<ul>\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> "
|
+ "title=\"annotation in pkg\"><span class=\"typeNameLink\">AnnotationType</span></a> "
|
||||||
+ "(implements java.lang.annotation.Annotation)</li>\n"
|
+ "(implements java.lang.annotation.Annotation)</li>\n"
|
||||||
+ "</ul>",
|
+ "</ul>",
|
||||||
"<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n"
|
"<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n"
|
||||||
+ "<ul>\n"
|
+ "<ul>\n"
|
||||||
+ "<li type=\"circle\">java.lang.Object\n"
|
+ "<li class=\"circle\">java.lang.Object\n"
|
||||||
+ "<ul>\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"
|
+ "Comparable<T>, java.io.Serializable)\n"
|
||||||
+ "<ul>\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"
|
+ "title=\"enum in pkg\"><span class=\"typeNameLink\">Coin</span></a></li>\n"
|
||||||
+ "</ul>\n"
|
+ "</ul>\n"
|
||||||
+ "</li>\n"
|
+ "</li>\n"
|
||||||
@ -74,7 +74,7 @@ public class TestClassTree extends JavadocTester {
|
|||||||
+ "</ul>");
|
+ "</ul>");
|
||||||
|
|
||||||
checkOutput("pkg/package-tree.html", false,
|
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>");
|
+ "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a></li>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -58,21 +58,21 @@ public class TestConstructors extends JavadocTester {
|
|||||||
+ "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
|
+ "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
|
||||||
+ "NestedInner(int)</code></a>",
|
+ "NestedInner(int)</code></a>",
|
||||||
"<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()",
|
"<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 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,
|
checkOutput("pkg1/Outer.Inner.html", true,
|
||||||
"<a href=\"../pkg1/Outer.Inner.html#Inner--\">Inner</a></span>()",
|
"<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 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,
|
checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
|
||||||
"<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\">NestedInner</a></span>()",
|
"<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 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,
|
checkOutput("pkg1/Outer.Inner.html", false,
|
||||||
"Outer.Inner--",
|
"Outer.Inner--",
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -53,11 +53,11 @@ public class TestHref extends JavadocTester {
|
|||||||
//Member summary table link.
|
//Member summary table link.
|
||||||
"href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"",
|
"href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"",
|
||||||
//Anchor test.
|
//Anchor test.
|
||||||
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
|
"<a id=\"method-int-int-java.util.ArrayList-\">\n"
|
||||||
+ "<!-- -->\n"
|
+ "<!-- -->\n"
|
||||||
+ "</a>",
|
+ "</a>",
|
||||||
//Backward compatibility anchor test."pkg/C1.html",
|
//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"
|
+ "<!-- -->\n"
|
||||||
+ "</a>");
|
+ "</a>");
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -113,7 +113,7 @@ public class TestHtmlDocument extends JavadocTester {
|
|||||||
// Test another version of A tag.
|
// Test another version of A tag.
|
||||||
HtmlTree anchor = new HtmlTree(HtmlTag.A);
|
HtmlTree anchor = new HtmlTree(HtmlTag.A);
|
||||||
anchor.addAttr(HtmlAttr.HREF, "testLink.html");
|
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);
|
p1.addContent(anchor);
|
||||||
body.addContent(p1);
|
body.addContent(p1);
|
||||||
// Test for empty tags.
|
// Test for empty tags.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<!-- ======== START OF PARAGRAPH ======== -->
|
<!-- ======== 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>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>
|
<dl>
|
||||||
<dd>Test DD</dd>
|
<dd>Test DD</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -48,37 +48,30 @@ public class TestHtmlTableStyles extends JavadocTester {
|
|||||||
|
|
||||||
checkOutput("pkg1/TestTable.html", true,
|
checkOutput("pkg1/TestTable.html", true,
|
||||||
"<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
|
"<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, "
|
||||||
+ "cellspacing=\"0\" summary=\"Field Summary table, listing fields, "
|
|
||||||
+ "and an explanation\">",
|
+ "and an explanation\">",
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Constructor Summary table, listing "
|
||||||
+ "cellspacing=\"0\" summary=\"Constructor Summary table, listing "
|
|
||||||
+ "constructors, and an explanation\">",
|
+ "constructors, and an explanation\">",
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, "
|
||||||
+ "cellspacing=\"0\" summary=\"Method Summary table, listing methods, "
|
|
||||||
+ "and an explanation\">");
|
+ "and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg1/package-summary.html", true,
|
checkOutput("pkg1/package-summary.html", true,
|
||||||
"<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, "
|
||||||
+ "cellspacing=\"0\" summary=\"Class Summary table, listing classes, "
|
|
||||||
+ "and an explanation\">");
|
+ "and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg1/class-use/TestTable.html", true,
|
checkOutput("pkg1/class-use/TestTable.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
|
||||||
+ "cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">");
|
|
||||||
|
|
||||||
checkOutput("overview-summary.html", true,
|
checkOutput("overview-summary.html", true,
|
||||||
"<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"overviewSummary\" "
|
||||||
+ "cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">");
|
+ "summary=\"Packages table, listing packages, and an explanation\">");
|
||||||
|
|
||||||
checkOutput("deprecated-list.html", true,
|
checkOutput("deprecated-list.html", true,
|
||||||
"<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " +
|
"<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing " +
|
||||||
"cellspacing=\"0\" summary=\"Deprecated Methods table, listing " +
|
|
||||||
"deprecated methods, and an explanation\">");
|
"deprecated methods, and an explanation\">");
|
||||||
|
|
||||||
checkOutput("constant-values.html", true,
|
checkOutput("constant-values.html", true,
|
||||||
"<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " +
|
"<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing " +
|
||||||
"cellspacing=\"0\" summary=\"Constant Field Values table, listing " +
|
|
||||||
"constant fields, and values\">");
|
"constant fields, and values\">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -63,111 +63,85 @@ public class TestHtmlTableTags extends JavadocTester {
|
|||||||
void checkHtmlTableSummaries() {
|
void checkHtmlTableSummaries() {
|
||||||
//Package summary
|
//Package summary
|
||||||
checkOutput("pkg1/package-summary.html", true,
|
checkOutput("pkg1/package-summary.html", true,
|
||||||
"<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
|
"<table class=\"typeSummary\" summary=\"Class Summary table, "
|
||||||
+ " cellspacing=\"0\" summary=\"Class Summary table, "
|
|
||||||
+ "listing classes, and an explanation\">",
|
+ "listing classes, and an explanation\">",
|
||||||
"<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
|
"<table class=\"typeSummary\" summary=\"Interface Summary table, "
|
||||||
+ " cellspacing=\"0\" summary=\"Interface Summary table, "
|
|
||||||
+ "listing interfaces, and an explanation\">");
|
+ "listing interfaces, and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg2/package-summary.html", true,
|
checkOutput("pkg2/package-summary.html", true,
|
||||||
"<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
|
"<table class=\"typeSummary\" summary=\"Enum Summary table, "
|
||||||
+ " cellspacing=\"0\" summary=\"Enum Summary table, "
|
|
||||||
+ "listing enums, and an explanation\">",
|
+ "listing enums, and an explanation\">",
|
||||||
"<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\""
|
"<table class=\"typeSummary\" summary=\"Annotation Types Summary table, "
|
||||||
+ " cellspacing=\"0\" summary=\"Annotation Types Summary table, "
|
|
||||||
+ "listing annotation types, and an explanation\">");
|
+ "listing annotation types, and an explanation\">");
|
||||||
|
|
||||||
// Class documentation
|
// Class documentation
|
||||||
checkOutput("pkg1/C1.html", true,
|
checkOutput("pkg1/C1.html", true,
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, "
|
||||||
+ "cellspacing=\"0\" summary=\"Field Summary table, listing fields, "
|
|
||||||
+ "and an explanation\">",
|
+ "and an explanation\">",
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, "
|
||||||
+ "cellspacing=\"0\" summary=\"Method Summary table, listing methods, "
|
|
||||||
+ "and an explanation\">");
|
+ "and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg2/C2.html", true,
|
checkOutput("pkg2/C2.html", true,
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing "
|
||||||
+ "cellspacing=\"0\" summary=\"Nested Class Summary table, listing "
|
|
||||||
+ "nested classes, and an explanation\">",
|
+ "nested classes, and an explanation\">",
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Constructor Summary table, listing "
|
||||||
+ "cellspacing=\"0\" summary=\"Constructor Summary table, listing "
|
|
||||||
+ "constructors, and an explanation\">");
|
+ "constructors, and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg2/C2.ModalExclusionType.html", true,
|
checkOutput("pkg2/C2.ModalExclusionType.html", true,
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing "
|
||||||
+ "cellspacing=\"0\" summary=\"Enum Constant Summary table, listing "
|
|
||||||
+ "enum constants, and an explanation\">");
|
+ "enum constants, and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg2/C3.html", true,
|
checkOutput("pkg2/C3.html", true,
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Required Element Summary table, "
|
||||||
+ "cellspacing=\"0\" summary=\"Required Element Summary table, "
|
|
||||||
+ "listing required elements, and an explanation\">");
|
+ "listing required elements, and an explanation\">");
|
||||||
|
|
||||||
checkOutput("pkg2/C4.html", true,
|
checkOutput("pkg2/C4.html", true,
|
||||||
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"memberSummary\" summary=\"Optional Element Summary table, "
|
||||||
+ "cellspacing=\"0\" summary=\"Optional Element Summary table, "
|
|
||||||
+ "listing optional elements, and an explanation\">");
|
+ "listing optional elements, and an explanation\">");
|
||||||
|
|
||||||
// Class use documentation
|
// Class use documentation
|
||||||
checkOutput("pkg1/class-use/I1.html", true,
|
checkOutput("pkg1/class-use/I1.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
|
||||||
+ "table, listing packages, and an explanation\">");
|
|
||||||
|
|
||||||
checkOutput("pkg1/class-use/C1.html", true,
|
checkOutput("pkg1/class-use/C1.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">",
|
||||||
+ "table, listing fields, and an explanation\">",
|
"<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
|
||||||
+ "table, listing methods, and an explanation\">");
|
|
||||||
|
|
||||||
checkOutput("pkg2/class-use/C2.html", true,
|
checkOutput("pkg2/class-use/C2.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">",
|
||||||
+ "table, listing fields, and an explanation\">",
|
"<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
|
||||||
+ "table, listing methods, and an explanation\">");
|
|
||||||
|
|
||||||
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
|
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
|
||||||
+ "table, listing packages, and an explanation\">");
|
|
||||||
|
|
||||||
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
|
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
|
||||||
+ "table, listing methods, and an explanation\">");
|
|
||||||
|
|
||||||
// Package use documentation
|
// Package use documentation
|
||||||
checkOutput("pkg1/package-use.html", true,
|
checkOutput("pkg1/package-use.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
|
||||||
+ "table, listing packages, and an explanation\">",
|
"<table class=\"useSummary\" summary=\"Use table, listing classes, and an explanation\">");
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
|
||||||
+ "table, listing classes, and an explanation\">");
|
|
||||||
|
|
||||||
checkOutput("pkg2/package-use.html", true,
|
checkOutput("pkg2/package-use.html", true,
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
"<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
|
||||||
+ "table, listing packages, and an explanation\">",
|
"<table class=\"useSummary\" summary=\"Use table, listing classes, and an explanation\">");
|
||||||
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use "
|
|
||||||
+ "table, listing classes, and an explanation\">");
|
|
||||||
|
|
||||||
// Deprecated
|
// Deprecated
|
||||||
checkOutput("deprecated-list.html", true,
|
checkOutput("deprecated-list.html", true,
|
||||||
"<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
|
"<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, "
|
||||||
+ "summary=\"Deprecated Fields table, listing deprecated fields, "
|
|
||||||
+ "and an explanation\">",
|
+ "and an explanation\">",
|
||||||
"<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
|
"<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, "
|
||||||
+ "summary=\"Deprecated Methods table, listing deprecated methods, "
|
|
||||||
+ "and an explanation\">");
|
+ "and an explanation\">");
|
||||||
|
|
||||||
// Constant values
|
// Constant values
|
||||||
checkOutput("constant-values.html", true,
|
checkOutput("constant-values.html", true,
|
||||||
"<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
|
"<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing "
|
||||||
+ "summary=\"Constant Field Values table, listing "
|
|
||||||
+ "constant fields, and values\">");
|
+ "constant fields, and values\">");
|
||||||
|
|
||||||
// Overview Summary
|
// Overview Summary
|
||||||
checkOutput("overview-summary.html", true,
|
checkOutput("overview-summary.html", true,
|
||||||
"<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" "
|
"<table class=\"overviewSummary\" "
|
||||||
+ "cellspacing=\"0\" summary=\"Packages table, "
|
+ "summary=\"Packages table, listing packages, and an explanation\">");
|
||||||
+ "listing packages, and an explanation\">");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
2158
langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java
Normal file
2158
langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -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 {
|
||||||
|
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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() {
|
||||||
|
}
|
||||||
|
}
|
@ -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() {
|
||||||
|
}
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
@ -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;
|
@ -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 {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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 {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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 {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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 {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
|
||||||
|
}
|
@ -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() {}
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user