mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8012295: Cleanup JavaFX features in standard doclet
Reviewed-by: darcy
This commit is contained in:
parent
100a8ab7e0
commit
3cbf2d13c3
6 changed files with 27 additions and 125 deletions
|
@ -131,15 +131,6 @@ public class TagletWriterImpl extends TagletWriter {
|
|||
return new TagletOutputImpl(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@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}
|
||||
*/
|
||||
|
@ -176,6 +167,19 @@ public class TagletWriterImpl extends TagletWriter {
|
|||
return new TagletOutputImpl(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@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}
|
||||
*/
|
||||
|
|
|
@ -60,14 +60,7 @@ public abstract class BasePropertyTaglet extends BaseTaglet {
|
|||
* @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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -158,8 +158,7 @@ public class TagletManager {
|
|||
|
||||
/**
|
||||
* 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 @@ public class TagletManager {
|
|||
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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -79,15 +79,6 @@ public abstract class TagletWriter {
|
|||
*/
|
||||
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.
|
||||
*
|
||||
|
@ -121,6 +112,15 @@ public abstract class TagletWriter {
|
|||
protected abstract TagletOutput paramTagOutput(ParamTag paramTag,
|
||||
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.
|
||||
*
|
||||
|
|
|
@ -51,14 +51,13 @@ public class TestJavaFX extends JavadocTester {
|
|||
{"./" + 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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue