--- /dev/null 2019-11-20 10:47:51.674104495 -0800 +++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlOptions.java 2020-01-21 10:51:30.013473861 -0800 @@ -0,0 +1,519 @@ +/* + * Copyright (c) 1998, 2020, 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 jdk.javadoc.internal.doclets.formats.html; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; + +import com.sun.tools.doclint.DocLint; +import jdk.javadoc.doclet.Doclet; +import jdk.javadoc.doclet.Reporter; +import jdk.javadoc.internal.doclets.toolkit.BaseOptions; +import jdk.javadoc.internal.doclets.toolkit.Resources; +import jdk.javadoc.internal.doclets.toolkit.util.DocFile; +import jdk.javadoc.internal.doclets.toolkit.util.Utils; + +import static javax.tools.Diagnostic.Kind.ERROR; +import static javax.tools.Diagnostic.Kind.WARNING; + +/** + * Storage for all options supported by the + * {@link jdk.javadoc.doclet.StandardDoclet standard doclet}, + * including the format-independent options handled + * by {@link BaseOptions}. + * + */ +public class HtmlOptions extends BaseOptions { + // + /** + * Argument for command-line option {@code --add-stylesheet}. + */ + public List additionalStylesheets = new ArrayList<>(); + + /** + * Argument for command-line option {@code -bottom}. + */ + public String bottom = ""; + + /** + * Argument for command-line option {@code -charset}. + * The META charset tag used for cross-platform viewing. + */ + public String charset = null; + + /** + * Argument for command-line option {@code -use}. + * True if command-line option "-use" is used. Default value is false. + */ + public boolean classUse = false; + + /** + * Argument for command-line option {@code -noindex}. + * False if command-line option "-noindex" is used. Default value is true. + */ + public boolean createIndex = true; + + /** + * Argument for command-line option {@code -overview}. + * This is true if option "-overview" is used or option "-overview" is not + * used and number of packages is more than one. + */ + public boolean createOverview = false; + + /** + * Argument for command-line option {@code -notree}. + * False if command-line option "-notree" is used. Default value is true. + */ + public boolean createTree = true; + + /** + * Arguments for command-line option {@code -Xdoclint} and friends. + * Collected set of doclint options. + */ + public Map doclintOpts = new LinkedHashMap<>(); + + /** + * Argument for command-line option {@code -Xdocrootparent}. + */ + public String docrootParent = ""; + + /** + * Argument for command-line option {@code -doctitle}. + */ + public String docTitle = ""; + + + /** + * Argument for command-line option {@code -footer}. + */ + public String footer = ""; + + /** + * Argument for command-line option {@code -header}. + */ + public String header = ""; + + /** + * Argument for command-line option {@code -helpfile}. + */ + public String helpFile = ""; + + /** + * Argument for command-line option {@code -nodeprecated}. + * True if command-line option "-nodeprecated" is used. Default value is + * false. + */ + public boolean noDeprecatedList = false; + + /** + * Argument for command-line option {@code -nohelp}. + * True if command-line option "-nohelp" is used. Default value is false. + */ + public boolean noHelp = false; + + /** + * Argument for command-line option {@code -nonavbar}. + * True if command-line option "-nonavbar" is used. Default value is false. + */ + public boolean noNavbar = false; + + /** + * Argument for command-line option {@code -nooverview}. + * True if command-line option "-nooverview" is used. Default value is + * false + */ + boolean noOverview = false; + + /** + * Argument for command-line option {@code -overview}. + * The overview path specified with "-overview" flag. + */ + public String overviewPath = null; + + /** + * Argument for command-line option {@code -packagesheader}. + */ + public String packagesHeader = ""; + + /** + * Argument for command-line option {@code -splitindex}. + * True if command-line option "-splitindex" is used. Default value is + * false. + */ + public boolean splitIndex = false; + + /** + * Argument for command-line option {@code -stylesheetfile}. + */ + public String stylesheetFile = ""; + + /** + * Argument for command-line option {@code -top}. + */ + public String top = ""; + + /** + * Argument for command-line option {@code -windowtitle}. + */ + public String windowTitle = ""; + // + + private HtmlConfiguration config; + + HtmlOptions(HtmlConfiguration config) { + super(config); + this.config = config; + } + + @Override + public Set getSupportedOptions() { + Resources resources = config.getResources(); + Reporter reporter = config.getReporter(); + + List