langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
changeset 31752 a4ea4c9bce2f
parent 31751 ec251536a004
child 33920 bd731341c405
equal deleted inserted replaced
31751:ec251536a004 31752:a4ea4c9bce2f
   287             } else if (opt.equals("-html4")) {
   287             } else if (opt.equals("-html4")) {
   288                 htmlVersion = HtmlVersion.HTML4;
   288                 htmlVersion = HtmlVersion.HTML4;
   289             } else if (opt.equals("-html5")) {
   289             } else if (opt.equals("-html5")) {
   290                 htmlVersion = HtmlVersion.HTML5;
   290                 htmlVersion = HtmlVersion.HTML5;
   291             } else if (opt.equals("-xdoclint")) {
   291             } else if (opt.equals("-xdoclint")) {
   292                 doclintOpts.add(null);
   292                 doclintOpts.add(DocLint.XMSGS_OPTION);
   293             } else if (opt.startsWith("-xdoclint:")) {
   293             } else if (opt.startsWith("-xdoclint:")) {
   294                 doclintOpts.add(opt.substring(opt.indexOf(":") + 1));
   294                 doclintOpts.add(DocLint.XMSGS_CUSTOM_PREFIX + opt.substring(opt.indexOf(":") + 1));
       
   295             } else if (opt.startsWith("-xdoclint/package:")) {
       
   296                 doclintOpts.add(DocLint.XCHECK_PACKAGE + opt.substring(opt.indexOf(":") + 1));
   295             }
   297             }
   296         }
   298         }
   297         if (root.specifiedClasses().length > 0) {
   299         if (root.specifiedClasses().length > 0) {
   298             Map<String,PackageDoc> map = new HashMap<>();
   300             Map<String,PackageDoc> map = new HashMap<>();
   299             PackageDoc pd;
   301             PackageDoc pd;
   346             option.equals("-nonavbar") ||
   348             option.equals("-nonavbar") ||
   347             option.equals("-nooverview") ||
   349             option.equals("-nooverview") ||
   348             option.equals("-html4") ||
   350             option.equals("-html4") ||
   349             option.equals("-html5") ||
   351             option.equals("-html5") ||
   350             option.equals("-xdoclint") ||
   352             option.equals("-xdoclint") ||
   351             option.startsWith("-xdoclint:")) {
   353             option.startsWith("-xdoclint:") ||
       
   354             option.startsWith("-xdoclint/package:")) {
   352             return 1;
   355             return 1;
   353         } else if (option.equals("-help")) {
   356         } else if (option.equals("-help")) {
   354             // Uugh: first, this should not be hidden inside optionLength,
   357             // Uugh: first, this should not be hidden inside optionLength,
   355             // and second, we should not be writing directly to stdout.
   358             // and second, we should not be writing directly to stdout.
   356             // But we have no access to a DocErrorReporter, which would
   359             // But we have no access to a DocErrorReporter, which would
   474                 if (!DocLint.isValidOption(
   477                 if (!DocLint.isValidOption(
   475                         opt.replace("-xdoclint:", DocLint.XMSGS_CUSTOM_PREFIX))) {
   478                         opt.replace("-xdoclint:", DocLint.XMSGS_CUSTOM_PREFIX))) {
   476                     reporter.printError(getText("doclet.Option_doclint_invalid_arg"));
   479                     reporter.printError(getText("doclet.Option_doclint_invalid_arg"));
   477                     return false;
   480                     return false;
   478                 }
   481                 }
       
   482             } else if (opt.startsWith("-xdoclint/package:")) {
       
   483                 if (!DocLint.isValidOption(
       
   484                         opt.replace("-xdoclint/package:", DocLint.XCHECK_PACKAGE))) {
       
   485                     reporter.printError(getText("doclet.Option_doclint_package_invalid_arg"));
       
   486                     return false;
       
   487                 }
   479             }
   488             }
   480         }
   489         }
   481         return true;
   490         return true;
   482     }
   491     }
   483 
   492