src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java
changeset 54350 4f9772f4403d
parent 54051 9a1dd1203a4f
child 54589 3babb3ed24c6
equal deleted inserted replaced
54349:492af1f4b6d5 54350:4f9772f4403d
   195      * used and number of packages is more than one.
   195      * used and number of packages is more than one.
   196      */
   196      */
   197     public boolean createoverview = false;
   197     public boolean createoverview = false;
   198 
   198 
   199     /**
   199     /**
   200      * Specifies whether or not frames should be generated.
       
   201      * Defaults to false; can be set to true by --frames; can be set to false by --no-frames; last one wins.
       
   202      */
       
   203     public boolean frames = false;
       
   204 
       
   205     /**
       
   206      * Collected set of doclint options
   200      * Collected set of doclint options
   207      */
   201      */
   208     public Map<Doclet.Option, String> doclintOpts = new LinkedHashMap<>();
   202     public Map<Doclet.Option, String> doclintOpts = new LinkedHashMap<>();
   209 
   203 
   210     public final Resources resources;
   204     public final Resources resources;
   373     protected void setTopFile(DocletEnvironment docEnv) {
   367     protected void setTopFile(DocletEnvironment docEnv) {
   374         if (!checkForDeprecation(docEnv)) {
   368         if (!checkForDeprecation(docEnv)) {
   375             return;
   369             return;
   376         }
   370         }
   377         if (createoverview) {
   371         if (createoverview) {
   378             topFile = DocPaths.overviewSummary(frames);
   372             topFile = DocPaths.INDEX;
   379         } else {
   373         } else {
   380             if (showModules) {
   374             if (showModules) {
   381                 topFile = DocPath.empty.resolve(docPaths.moduleSummary(modules.first()));
   375                 topFile = DocPath.empty.resolve(docPaths.moduleSummary(modules.first()));
   382             } else if (packages.size() == 1 && packages.first().isUnnamed()) {
   376             } else if (packages.size() == 1 && packages.first().isUnnamed()) {
   383                 List<TypeElement> classes = new ArrayList<>(getIncludedTypeElements());
   377                 List<TypeElement> classes = new ArrayList<>(getIncludedTypeElements());
   638                         return false;
   632                         return false;
   639                     }
   633                     }
   640                     return true;
   634                     return true;
   641                 }
   635                 }
   642             },
   636             },
   643             new Option(resources, "--frames") {
       
   644                 @Override
       
   645                 public boolean process(String opt,  List<String> args) {
       
   646                     reporter.print(WARNING, resources.getText("doclet.Frames_specified", helpfile));
       
   647                     frames = true;
       
   648                     return true;
       
   649                 }
       
   650             },
       
   651             new Option(resources, "--no-frames") {
       
   652                 @Override
       
   653                 public boolean process(String opt,  List<String> args) {
       
   654                     frames = false;
       
   655                     return true;
       
   656                 }
       
   657             },
       
   658             new Hidden(resources, "-packagesheader", 1) {
   637             new Hidden(resources, "-packagesheader", 1) {
   659                 @Override
   638                 @Override
   660                 public boolean process(String opt,  List<String> args) {
   639                 public boolean process(String opt,  List<String> args) {
   661                     packagesheader = args.get(0);
   640                     packagesheader = args.get(0);
   662                     return true;
   641                     return true;
   745                     doclintOpts.put(this, dopt);
   724                     doclintOpts.put(this, dopt);
   746                     if (!DocLint.isValidOption(dopt)) {
   725                     if (!DocLint.isValidOption(dopt)) {
   747                         reporter.print(ERROR, resources.getText("doclet.Option_doclint_package_invalid_arg"));
   726                         reporter.print(ERROR, resources.getText("doclet.Option_doclint_package_invalid_arg"));
   748                         return false;
   727                         return false;
   749                     }
   728                     }
       
   729                     return true;
       
   730                 }
       
   731             },
       
   732             new XOption(resources, "--no-frames") {
       
   733                 @Override
       
   734                 public boolean process(String opt, List<String> args) {
       
   735                     reporter.print(WARNING, resources.getText("doclet.NoFrames_specified"));
   750                     return true;
   736                     return true;
   751                 }
   737                 }
   752             }
   738             }
   753         };
   739         };
   754         Set<Doclet.Option> oset = new TreeSet<>();
   740         Set<Doclet.Option> oset = new TreeSet<>();