--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Tue May 14 10:14:56 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Tue May 14 10:14:56 2013 -0700
@@ -134,15 +134,6 @@
/**
* {@inheritDoc}
*/
- protected TagletOutput expertTagOutput(Tag tag) {
- HtmlTree result = new HtmlTree(HtmlTag.SUB, new StringContent(tag.text()));
- result.addAttr(HtmlAttr.ID, "expert");
- return new TagletOutputImpl(result);
- }
-
- /**
- * {@inheritDoc}
- */
protected TagletOutput literalTagOutput(Tag tag) {
Content result = new StringContent(tag.text());
return new TagletOutputImpl(result);
@@ -179,6 +170,19 @@
/**
* {@inheritDoc}
*/
+ public TagletOutput propertyTagOutput(Tag tag, String prefix) {
+ Content body = new ContentBuilder();
+ body.addContent(new RawHtml(prefix));
+ body.addContent(" ");
+ body.addContent(HtmlTree.CODE(new RawHtml(tag.text())));
+ body.addContent(".");
+ Content result = HtmlTree.P(body);
+ return new TagletOutputImpl(result);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public TagletOutput returnTagOutput(Tag returnTag) {
ContentBuilder result = new ContentBuilder();
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BasePropertyTaglet.java Tue May 14 10:14:56 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BasePropertyTaglet.java Tue May 14 10:14:56 2013 -0700
@@ -60,14 +60,7 @@
* @return the TagletOutput representation of this <code>Tag</code>.
*/
public TagletOutput getTagletOutput(Tag tag, TagletWriter tagletWriter) {
- TagletOutput tagletOutput = tagletWriter.getOutputInstance();
- StringBuilder output = new StringBuilder("<P>");
- output.append(getText(tagletWriter));
- output.append(" <CODE>");
- output.append(tag.text());
- output.append("</CODE>.</P>");
- tagletOutput.setOutput(output.toString());
- return tagletOutput;
+ return tagletWriter.propertyTagOutput(tag, getText(tagletWriter));
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ExpertTaglet.java Tue May 14 10:14:56 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, 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.internal.toolkit.taglets;
-
-import java.util.Map;
-
-import com.sun.javadoc.Tag;
-
-/**
- * An inline Taglet used to denote information for experts.
- *
- * <p><b>This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.</b>
- *
- */
-public class ExpertTaglet extends BaseTaglet {
-
- private static final String NAME = "expert";
-
- /**
- * {@inheritDoc}
- */
- public boolean inField() {
- return true;
- }
-
- public boolean inConstructor() {
- return true;
- }
-
- public boolean inMethod() {
- return true;
- }
-
- public boolean inOverview() {
- return true;
- }
-
- public boolean inPackage() {
- return true;
- }
-
- public boolean inType() {
- return true;
- }
-
- public boolean isInlineTag() {
- return false;
- }
-
- public String getName() {
- return NAME;
- }
-
- public static void register(Map<String, Taglet> map) {
- map.remove(NAME);
- map.put(NAME, new ExpertTaglet());
- }
-
- /**
- * {@inheritDoc}
- */
- public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) {
- return writer.expertTagOutput(tag);
- }
-}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java Tue May 14 10:14:56 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java Tue May 14 10:14:56 2013 -0700
@@ -158,8 +158,7 @@
/**
* True if we want to use JavaFX-related tags (@propertyGetter,
- * @propertySetter, @propertyDescription, @defaultValue, @treatAsPrivate,
- * @expert).
+ * @propertySetter, @propertyDescription, @defaultValue, @treatAsPrivate).
*/
private boolean javafx;
@@ -703,14 +702,12 @@
SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp);
customTags.put((temp = new SimpleTaglet("treatAsPrivate", null,
SimpleTaglet.FIELD + SimpleTaglet.METHOD + SimpleTaglet.TYPE)).getName(), temp);
- customTags.put((temp = new ExpertTaglet()).getName(), temp);
standardTags.add("propertyGetter");
standardTags.add("propertySetter");
standardTags.add("propertyDescription");
standardTags.add("defaultValue");
standardTags.add("treatAsPrivate");
- standardTags.add("expert");
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java Tue May 14 10:14:56 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java Tue May 14 10:14:56 2013 -0700
@@ -80,15 +80,6 @@
protected abstract TagletOutput deprecatedTagOutput(Doc doc);
/**
- * Return the output for a {@expert...} tag.
- *
- * @param tag the tag.
- * @return the output of the taglet.
- */
- // TODO: remove this taglet
- protected abstract TagletOutput expertTagOutput(Tag tag);
-
- /**
* Return the output for a {@literal...} tag.
*
* @param tag the tag.
@@ -122,6 +113,15 @@
String paramName);
/**
+ * Return the output for property tags.
+ *
+ * @param propertyTag the parameter to document.
+ * @param prefix the text with which to prefix the property name.
+ * @return the output of the param tag.
+ */
+ protected abstract TagletOutput propertyTagOutput(Tag propertyTag, String prefix);
+
+ /**
* Return the return tag output.
*
* @param returnTag the return tag to output.
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Tue May 14 10:14:56 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Tue May 14 10:14:56 2013 -0700
@@ -51,14 +51,13 @@
{"./" + BUG_ID + "/C.html",
"<td class=\"colLast\"><code><strong><a href=\"C.html#rateProperty\">rate</a></strong></code>" + NL +
"<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"},
- {"./" + BUG_ID + "/C.html",
- "<sub id=\"expert\">Expert tag text</sub>"},
+
{"./" + BUG_ID + "/C.html",
"<span class=\"strong\">Default value:</span>"},
{"./" + BUG_ID + "/C.html",
- "<P>Sets the value of the property <CODE>Property</CODE>"},
+ "<p>Sets the value of the property <code>Property</code>"},
{"./" + BUG_ID + "/C.html",
- "<P>Gets the value of the property <CODE>Property</CODE>"},
+ "<p>Gets the value of the property <code>Property</code>"},
{"./" + BUG_ID + "/C.html",
"<span class=\"strong\">Property description:</span>"},
{"./" + BUG_ID + "/C.html",