src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java
changeset 52644 43efb4ca6d6c
parent 51861 f7d40158eb2f
child 53562 0d9dee001667
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Wed Nov 21 15:06:13 2018 -0500
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Wed Nov 21 12:36:16 2018 -0800
@@ -288,6 +288,10 @@
         return resources;
     }
 
+    public Contents getContents() {
+        return contents;
+    }
+
     @Override
     public Messages getMessages() {
         return messages;
@@ -307,7 +311,7 @@
         if (!helpfile.isEmpty()) {
             DocFile help = DocFile.createFileForInput(this, helpfile);
             if (!help.exists()) {
-                reporter.print(ERROR, getText("doclet.File_not_found", helpfile));
+                reporter.print(ERROR, resources.getText("doclet.File_not_found", helpfile));
                 return false;
             }
         }
@@ -315,7 +319,7 @@
         if (!stylesheetfile.isEmpty()) {
             DocFile stylesheet = DocFile.createFileForInput(this, stylesheetfile);
             if (!stylesheet.exists()) {
-                reporter.print(ERROR, getText("doclet.File_not_found", stylesheetfile));
+                reporter.print(ERROR, resources.getText("doclet.File_not_found", stylesheetfile));
                 return false;
             }
         }
@@ -323,7 +327,7 @@
         for (String ssheet : additionalStylesheets) {
             DocFile ssfile = DocFile.createFileForInput(this, ssheet);
             if (!ssfile.exists()) {
-                reporter.print(ERROR, getText("doclet.File_not_found", ssheet));
+                reporter.print(ERROR, resources.getText("doclet.File_not_found", ssheet));
                 return false;
             }
         }
@@ -505,63 +509,6 @@
         return (e == null || workArounds.haveDocLint());
     }
 
-    @Override
-    public String getText(String key) {
-        return resources.getText(key);
-    }
-
-    @Override
-    public String getText(String key, String... args) {
-        return resources.getText(key, (Object[]) args);
-    }
-
-   /**
-     * {@inheritdoc}
-     */
-    @Override
-    public Content getContent(String key) {
-        return contents.getContent(key);
-    }
-
-    /**
-     * Get the configuration string as a content.
-     *
-     * @param key the key to look for in the configuration file
-     * @param o   string or content argument added to configuration text
-     * @return a content tree for the text
-     */
-    @Override
-    public Content getContent(String key, Object o) {
-        return contents.getContent(key, o);
-    }
-
-    /**
-     * Get the configuration string as a content.
-     *
-     * @param key the key to look for in the configuration file
-     * @param o1 resource argument
-     * @param o2 resource argument
-     * @return a content tree for the text
-     */
-    @Override
-    public Content getContent(String key, Object o1, Object o2) {
-        return contents.getContent(key, o1, o2);
-    }
-
-    /**
-     * Get the configuration string as a content.
-     *
-     * @param key the key to look for in the configuration file
-     * @param o0  string or content argument added to configuration text
-     * @param o1  string or content argument added to configuration text
-     * @param o2  string or content argument added to configuration text
-     * @return a content tree for the text
-     */
-    @Override
-    public Content getContent(String key, Object o0, Object o1, Object o2) {
-        return contents.getContent(key, o0, o1, o2);
-    }
-
     protected void buildSearchTagIndex() {
         for (SearchIndexItem sii : tagSearchIndex) {
             String tagLabel = sii.getLabel();
@@ -628,12 +575,12 @@
                 @Override
                 public boolean process(String opt,  List<String> args) {
                     if (nohelp == true) {
-                        reporter.print(ERROR, getText("doclet.Option_conflict",
+                        reporter.print(ERROR, resources.getText("doclet.Option_conflict",
                                 "-helpfile", "-nohelp"));
                         return false;
                     }
                     if (!helpfile.isEmpty()) {
-                        reporter.print(ERROR, getText("doclet.Option_reuse",
+                        reporter.print(ERROR, resources.getText("doclet.Option_reuse",
                                 "-helpfile"));
                         return false;
                     }
@@ -644,7 +591,7 @@
             new Option(resources, "-html4") {
                 @Override
                 public boolean process(String opt,  List<String> args) {
-                    reporter.print(WARNING, getText("doclet.HTML_4_specified", helpfile));
+                    reporter.print(WARNING, resources.getText("doclet.HTML_4_specified", helpfile));
                     htmlVersion = HtmlVersion.HTML4;
                     return true;
                 }
@@ -661,7 +608,7 @@
                 public boolean process(String opt, List<String> args) {
                     nohelp = true;
                     if (!helpfile.isEmpty()) {
-                        reporter.print(ERROR, getText("doclet.Option_conflict",
+                        reporter.print(ERROR, resources.getText("doclet.Option_conflict",
                                 "-nohelp", "-helpfile"));
                         return false;
                     }
@@ -680,7 +627,7 @@
                 public boolean process(String opt,  List<String> args) {
                     createindex = false;
                     if (splitindex == true) {
-                        reporter.print(ERROR, getText("doclet.Option_conflict",
+                        reporter.print(ERROR, resources.getText("doclet.Option_conflict",
                                 "-noindex", "-splitindex"));
                         return false;
                     }
@@ -699,7 +646,7 @@
                 public boolean process(String opt,  List<String> args) {
                     nooverview = true;
                     if (overviewpath != null) {
-                        reporter.print(ERROR, getText("doclet.Option_conflict",
+                        reporter.print(ERROR, resources.getText("doclet.Option_conflict",
                                 "-nooverview", "-overview"));
                         return false;
                     }
@@ -718,7 +665,7 @@
                 public boolean process(String opt,  List<String> args) {
                     overviewpath = args.get(0);
                     if (nooverview == true) {
-                        reporter.print(ERROR, getText("doclet.Option_conflict",
+                        reporter.print(ERROR, resources.getText("doclet.Option_conflict",
                                 "-overview", "-nooverview"));
                         return false;
                     }
@@ -728,7 +675,7 @@
             new Option(resources, "--frames") {
                 @Override
                 public boolean process(String opt,  List<String> args) {
-                    reporter.print(WARNING, getText("doclet.Frames_specified", helpfile));
+                    reporter.print(WARNING, resources.getText("doclet.Frames_specified", helpfile));
                     frames = true;
                     return true;
                 }
@@ -752,7 +699,7 @@
                 public boolean process(String opt, List<String> args) {
                     splitindex = true;
                     if (createindex == false) {
-                        reporter.print(ERROR, getText("doclet.Option_conflict",
+                        reporter.print(ERROR, resources.getText("doclet.Option_conflict",
                                 "-splitindex", "-noindex"));
                         return false;
                     }
@@ -801,7 +748,7 @@
                     try {
                         URL ignored = new URL(docrootparent);
                     } catch (MalformedURLException e) {
-                        reporter.print(ERROR, getText("doclet.MalformedURL", docrootparent));
+                        reporter.print(ERROR, resources.getText("doclet.MalformedURL", docrootparent));
                         return false;
                     }
                     return true;
@@ -813,11 +760,11 @@
                     String dopt = opt.replace("-Xdoclint:", DocLint.XMSGS_CUSTOM_PREFIX);
                     doclintOpts.put(this, dopt);
                     if (dopt.contains("/")) {
-                        reporter.print(ERROR, getText("doclet.Option_doclint_no_qualifiers"));
+                        reporter.print(ERROR, resources.getText("doclet.Option_doclint_no_qualifiers"));
                         return false;
                     }
                     if (!DocLint.isValidOption(dopt)) {
-                        reporter.print(ERROR, getText("doclet.Option_doclint_invalid_arg"));
+                        reporter.print(ERROR, resources.getText("doclet.Option_doclint_invalid_arg"));
                         return false;
                     }
                     return true;
@@ -829,7 +776,7 @@
                     String dopt = opt.replace("-Xdoclint/package:", DocLint.XCHECK_PACKAGE);
                     doclintOpts.put(this, dopt);
                     if (!DocLint.isValidOption(dopt)) {
-                        reporter.print(ERROR, getText("doclet.Option_doclint_package_invalid_arg"));
+                        reporter.print(ERROR, resources.getText("doclet.Option_doclint_package_invalid_arg"));
                         return false;
                     }
                     return true;
@@ -854,7 +801,7 @@
             if (charset == null) {
                 charset = docencoding;
             } else if (!charset.equals(docencoding)) {
-                reporter.print(ERROR, getText("doclet.Option_conflict", "-charset", "-docencoding"));
+                reporter.print(ERROR, resources.getText("doclet.Option_conflict", "-charset", "-docencoding"));
                 return false;
             }
         }