--- old/make/src/classes/build/tools/taglet/ExtLink.java Thu May 11 13:41:06 2017 +++ new/make/src/classes/build/tools/taglet/ExtLink.java Thu May 11 13:41:06 2017 @@ -37,17 +37,23 @@ import jdk.javadoc.doclet.Taglet; import static com.sun.source.doctree.DocTree.Kind.*; -import static jdk.javadoc.doclet.Taglet.Location.*; /** * An inline tag to conveniently insert an external link. * The tag can be used as follows: - * {@extLink name description}, for example + * {@extLink name description}. *

+ * Using the tag as follows: + *
* {@code Please see {@extLink Borealis a spectacular} sight.} - *

- * will produce the following html - *

+ *
+ * the taglet will produce the following html: + *

+ * {@code Please see a spectacular sight.} + *

+ * If the property {@code build.tools.taglet.ExtLink.LINK} is set, using + * the above example, the taglet will produce the following html: + *

* {@code * Please see a spectacular sight. * } @@ -60,6 +66,8 @@ static final Pattern TAG_PATTERN = Pattern.compile("(\\s*)(?\\w+)(\\s+)(?.*)"); + static final boolean LINK = Boolean.getBoolean("build.tools.taglet.ExtLink.LINK"); + /** * Returns the set of locations in which the tag may be used. */ @@ -97,13 +105,19 @@ if (!m.find()) return ""; - StringBuilder sb = new StringBuilder("") - .append(m.group("desc")) - .append(""); - + StringBuilder sb = new StringBuilder(); + if (LINK) { + sb.append("") + .append(m.group("desc")) + .append(""); + } else { + sb.append("") + .append(m.group("desc")) + .append(""); + } return sb.toString(); } }