8178830: standard doclet: -javafx option should be unhidden
Reviewed-by: bpatel, jjg
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties Thu Apr 20 13:43:03 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties Thu Apr 20 14:37:15 2017 -0700
@@ -332,6 +332,9 @@
doclet.usage.charset.description=\
Charset for cross-platform viewing of generated documentation
+doclet.usage.javafx.description=\
+ Enable javafx functionality
+
doclet.usage.helpfile.parameters=\
<file>
doclet.usage.helpfile.description=\
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java Thu Apr 20 13:43:03 2017 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java Thu Apr 20 14:37:15 2017 -0700
@@ -523,7 +523,7 @@
return true;
}
},
- new Hidden(resources, "-javafx") {
+ new Option(resources, "--javafx -javafx") {
@Override
public boolean process(String opt, List<String> args) {
javafx = true;
@@ -1082,11 +1082,14 @@
private final int argCount;
protected Option(Resources resources, String name, int argCount) {
- this(resources, "doclet.usage." + name.toLowerCase().replaceAll("^-+", ""), name, argCount);
+ this(resources, null, name, argCount);
}
protected Option(Resources resources, String keyBase, String name, int argCount) {
this.names = name.trim().split("\\s+");
+ if (keyBase == null) {
+ keyBase = "doclet.usage." + names[0].toLowerCase().replaceAll("^-+", "");
+ }
String desc = getOptionsMessage(resources, keyBase + ".description");
if (desc.isEmpty()) {
this.description = "<MISSING KEY>";
--- a/langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java Thu Apr 20 13:43:03 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java Thu Apr 20 14:37:15 2017 -0700
@@ -23,7 +23,8 @@
/*
* @test
- * @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363 8167967 8172528 8175200
+ * @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
+ * 8167967 8172528 8175200 8178830
* @summary Test of the JavaFX doclet features.
* @author jvalenta
* @library ../lib
@@ -265,12 +266,13 @@
/*
* Force the doclet to emit a warning when processing a synthesized,
- * DocComment, and ensure that the run succeeds.
+ * DocComment, and ensure that the run succeeds, using the newer
+ * --javafx flag.
*/
@Test
void test4() {
javadoc("-d", "out4",
- "-javafx",
+ "--javafx",
"-Xdoclint:none",
"-sourcepath", testSrc,
"-package",