src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPaths.java
author bpatel
Thu, 17 May 2018 12:59:53 -0700
changeset 50167 cc705c956798
parent 49569 d4d2f634b72f
child 50394 89dc31d7572b
permissions -rw-r--r--
8196201: Generate pages to list all classes and all packages in javadoc output Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     1
/*
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
     2
 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     4
 *
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    10
 *
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    15
 * accompanied this code).
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    16
 *
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    20
 *
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    23
 * questions.
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    24
 */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    25
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 33920
diff changeset
    26
package jdk.javadoc.internal.doclets.toolkit.util;
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    27
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    28
import javax.lang.model.element.ModuleElement;
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    29
import javax.lang.model.element.PackageElement;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    30
import javax.lang.model.element.TypeElement;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    31
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    32
/**
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    33
 * Standard DocPath objects.
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    34
 *
14368
6f4c62de6985 8001664: refactor javadoc to use abstraction to handle files
jjg
parents: 14357
diff changeset
    35
 *  <p><b>This is NOT part of any supported API.
6f4c62de6985 8001664: refactor javadoc to use abstraction to handle files
jjg
parents: 14357
diff changeset
    36
 *  If you write code that depends on this, you do so at your own risk.
6f4c62de6985 8001664: refactor javadoc to use abstraction to handle files
jjg
parents: 14357
diff changeset
    37
 *  This code and its internal interfaces are subject to change or
6f4c62de6985 8001664: refactor javadoc to use abstraction to handle files
jjg
parents: 14357
diff changeset
    38
 *  deletion without notice.</b>
6f4c62de6985 8001664: refactor javadoc to use abstraction to handle files
jjg
parents: 14357
diff changeset
    39
 *
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    40
 */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    41
public class DocPaths {
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    42
    private final boolean useModuleDirectories;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    43
    private final String moduleSeparator;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    44
    private final Utils utils;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    45
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    46
    public DocPaths(Utils utils, boolean useModuleDirectories) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    47
        this.utils = utils;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    48
        this.useModuleDirectories = useModuleDirectories;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    49
        moduleSeparator = useModuleDirectories ? "/module-" : "-";
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    50
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
    51
49569
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
    52
    public static final DocPath DOT_DOT = DocPath.create("..");
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
    53
40500
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
    54
    /** The name of the file for all classes, without using frames, when --no-frames is specified. */
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
    55
    public static final DocPath ALLCLASSES = DocPath.create("allclasses.html");
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    56
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    57
    /** The name of the file for all classes, using frames. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    58
    public static final DocPath ALLCLASSES_FRAME = DocPath.create("allclasses-frame.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    59
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49569
diff changeset
    60
    /** The name of the file for all classes index. */
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49569
diff changeset
    61
    public static final DocPath ALLCLASSES_INDEX = DocPath.create("allclasses-index.html");
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49569
diff changeset
    62
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49569
diff changeset
    63
    /** The name of the file for all packages index. */
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49569
diff changeset
    64
    public static final DocPath ALLPACKAGES_INDEX = DocPath.create("allpackages-index.html");
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49569
diff changeset
    65
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    66
    /** The name of the file for all classes, without using frames. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    67
    public static final DocPath ALLCLASSES_NOFRAME = DocPath.create("allclasses-noframe.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    68
40500
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
    69
    public static DocPath AllClasses(boolean frames) {
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
    70
        return frames ? ALLCLASSES_NOFRAME : ALLCLASSES;
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
    71
    }
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
    72
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    73
    /** The name of the sub-directory for storing class usage info. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    74
    public static final DocPath CLASS_USE = DocPath.create("class-use");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    75
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    76
    /** The name of the file for constant values. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    77
    public static final DocPath CONSTANT_VALUES = DocPath.create("constant-values.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    78
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    79
    /** The name of the fie for deprecated elements. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    80
    public static final DocPath DEPRECATED_LIST = DocPath.create("deprecated-list.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    81
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    82
    /** The name of the subdirectory for user-provided additional documentation files. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    83
    public static final DocPath DOC_FILES = DocPath.create("doc-files");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    84
48295
c79d31ba84b9 8164407: Add module support for -link and -linkoffline javadoc option
bpatel
parents: 48029
diff changeset
    85
    /** The name of the file for the element list. */
c79d31ba84b9 8164407: Add module support for -link and -linkoffline javadoc option
bpatel
parents: 48029
diff changeset
    86
    public static final DocPath ELEMENT_LIST = DocPath.create("element-list");
c79d31ba84b9 8164407: Add module support for -link and -linkoffline javadoc option
bpatel
parents: 48029
diff changeset
    87
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    88
    /** The name of the image file showing a magnifying glass on the search box. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    89
    public static final DocPath GLASS_IMG = DocPath.create("glass.png");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    90
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    91
    /** The name of the file for help info. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    92
    public static final DocPath HELP_DOC = DocPath.create("help-doc.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    93
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    94
    /** The name of the main index file. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    95
    public static final DocPath INDEX = DocPath.create("index.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    96
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    97
    /** The name of the single index file for all classes. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    98
    public static final DocPath INDEX_ALL = DocPath.create("index-all.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
    99
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   100
    /** The name of the directory for the split index files. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   101
    public static final DocPath INDEX_FILES = DocPath.create("index-files");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   102
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   103
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   104
     * Generate the name of one of the files in the split index.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   105
     * @param n the position in the index
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   106
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   107
     */
22163
3651128c74eb 8030244: Update langtools to use Diamond
briangoetz
parents: 15723
diff changeset
   108
    public static DocPath indexN(int n) {
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   109
        return DocPath.create("index-" + n + ".html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   110
    }
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   111
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents: 14368
diff changeset
   112
    /** The name of the default javascript file. */
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents: 14368
diff changeset
   113
    public static final DocPath JAVASCRIPT = DocPath.create("script.js");
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents: 14368
diff changeset
   114
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   115
    /** The name of the directory for the jQuery. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   116
    public static final DocPath JQUERY_FILES = DocPath.create("jquery");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   117
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   118
    /** The name of the default jQuery stylesheet file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   119
    public static final DocPath JQUERY_STYLESHEET_FILE = DocPath.create("jquery-ui.css");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   120
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   121
    /** The name of the default jQuery javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   122
    public static final DocPath JQUERY_JS_1_10 = DocPath.create("jquery-1.10.2.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   123
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   124
    /** The name of the default jQuery javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   125
    public static final DocPath JQUERY_JS = DocPath.create("jquery-ui.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   126
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   127
    /** The name of the default jszip javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   128
    public static final DocPath JSZIP = DocPath.create("jszip/dist/jszip.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   129
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   130
    /** The name of the default jszip javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   131
    public static final DocPath JSZIP_MIN = DocPath.create("jszip/dist/jszip.min.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   132
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   133
    /** The name of the default jszip-utils javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   134
    public static final DocPath JSZIPUTILS = DocPath.create("jszip-utils/dist/jszip-utils.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   135
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   136
    /** The name of the default jszip-utils javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   137
    public static final DocPath JSZIPUTILS_MIN = DocPath.create("jszip-utils/dist/jszip-utils.min.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   138
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   139
    /** The name of the default jszip-utils javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   140
    public static final DocPath JSZIPUTILS_IE = DocPath.create("jszip-utils/dist/jszip-utils-ie.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   141
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   142
    /** The name of the default jszip-utils javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   143
    public static final DocPath JSZIPUTILS_IE_MIN = DocPath.create("jszip-utils/dist/jszip-utils-ie.min.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   144
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   145
    /** The name of the member search index file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   146
    public static final DocPath MEMBER_SEARCH_INDEX_JSON = DocPath.create("member-search-index.json");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   147
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   148
    /** The name of the member search index zip file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   149
    public static final DocPath MEMBER_SEARCH_INDEX_ZIP = DocPath.create("member-search-index.zip");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   150
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   151
    /** The name of the member search index js file. */
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   152
    public static final DocPath MEMBER_SEARCH_INDEX_JS = DocPath.create("member-search-index.js");
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   153
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40500
diff changeset
   154
    /** The name of the module search index file. */
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40500
diff changeset
   155
    public static final DocPath MODULE_SEARCH_INDEX_JSON = DocPath.create("module-search-index.json");
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40500
diff changeset
   156
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   157
    /** The name of the module search index zip file. */
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40500
diff changeset
   158
    public static final DocPath MODULE_SEARCH_INDEX_ZIP = DocPath.create("module-search-index.zip");
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40500
diff changeset
   159
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   160
    /** The name of the module search index js file. */
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   161
    public static final DocPath MODULE_SEARCH_INDEX_JS = DocPath.create("module-search-index.js");
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   162
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   163
    /** The name of the file for the overview frame. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   164
    public static final DocPath OVERVIEW_FRAME = DocPath.create("overview-frame.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   165
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   166
    /** The name of the file for the overview summary. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   167
    public static final DocPath OVERVIEW_SUMMARY = DocPath.create("overview-summary.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   168
40500
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
   169
    public static DocPath overviewSummary(boolean frames) {
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
   170
        return frames ? OVERVIEW_SUMMARY : INDEX;
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
   171
    }
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40229
diff changeset
   172
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   173
    /** The name of the file for the overview tree. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   174
    public static final DocPath OVERVIEW_TREE = DocPath.create("overview-tree.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   175
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   176
    /** The name of the file for the package frame. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   177
    public static final DocPath PACKAGE_FRAME = DocPath.create("package-frame.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   178
48295
c79d31ba84b9 8164407: Add module support for -link and -linkoffline javadoc option
bpatel
parents: 48029
diff changeset
   179
    /** The name of the file for the package list. This is to support the legacy mode. */
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   180
    public static final DocPath PACKAGE_LIST = DocPath.create("package-list");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   181
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   182
    /** The name of the package search index file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   183
    public static final DocPath PACKAGE_SEARCH_INDEX_JSON = DocPath.create("package-search-index.json");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   184
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   185
    /** The name of the package search index zip file. */
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   186
    public static final DocPath PACKAGE_SEARCH_INDEX_ZIP = DocPath.create("package-search-index.zip");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   187
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   188
    /** The name of the package search index js file. */
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   189
    public static final DocPath PACKAGE_SEARCH_INDEX_JS = DocPath.create("package-search-index.js");
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   190
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   191
    /** The name of the file for the package summary. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   192
    public static final DocPath PACKAGE_SUMMARY = DocPath.create("package-summary.html");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   193
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   194
    /** The name of the file for the package tree. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   195
    public static final DocPath PACKAGE_TREE = DocPath.create("package-tree.html");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   196
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   197
    /** The name of the file for the package usage info. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   198
    public static final DocPath PACKAGE_USE = DocPath.create("package-use.html");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   199
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   200
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   201
     * Returns the path for a type element.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   202
     * For example, if the type element is {@code java.lang.Object},
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   203
     * the path is {@code java/lang/Object.html}.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   204
     *
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   205
     * @param typeElement the type element
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   206
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   207
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   208
    public DocPath forClass(TypeElement typeElement) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   209
        return (typeElement == null)
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   210
                ? DocPath.empty
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   211
                : forPackage(utils.containingPackage(typeElement)).resolve(forName(typeElement));
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   212
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   213
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   214
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   215
     * Returns the path for the simple name of a type element.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   216
     * For example, if the type element is {@code java.lang.Object},
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   217
     * the path is {@code Object.html}.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   218
     *
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   219
     * @param typeElement the type element
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   220
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   221
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   222
    public DocPath forName(TypeElement typeElement) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   223
        return (typeElement == null)
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   224
                ? DocPath.empty
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   225
                : new DocPath(utils.getSimpleName(typeElement) + ".html");
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   226
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   227
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   228
    public static DocPath forModule(ModuleElement mdle) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   229
        return mdle == null || mdle.isUnnamed()
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   230
                ? DocPath.empty
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   231
                : DocPath.create(mdle.getQualifiedName().toString());
48029
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47216
diff changeset
   232
    }
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47216
diff changeset
   233
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   234
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   235
     * Returns the path for the package of a type element.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   236
     * For example, if the type element is {@code java.lang.Object},
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   237
     * the path is {@code java/lang}.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   238
     *
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   239
     * @param typeElement the type element
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   240
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   241
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   242
    public DocPath forPackage(TypeElement typeElement) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   243
        return (typeElement == null)
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   244
                ? DocPath.empty
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   245
                : forPackage(utils.containingPackage(typeElement));
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   246
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   247
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   248
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   249
     * Returns the path for a package.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   250
     * For example, if the package is {@code java.lang},
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   251
     * the path is {@code java/lang}.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   252
     *
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   253
     * @param pkgElement the package element
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   254
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   255
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   256
    public DocPath forPackage(PackageElement pkgElement) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   257
        if (pkgElement == null || pkgElement.isUnnamed()) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   258
            return DocPath.empty;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   259
        }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   260
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   261
        DocPath pkgPath = DocPath.create(pkgElement.getQualifiedName().toString().replace('.', '/'));
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   262
        if (useModuleDirectories) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   263
            ModuleElement mdle = (ModuleElement) pkgElement.getEnclosingElement();
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   264
            return forModule(mdle).resolve(pkgPath);
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   265
        } else {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   266
            return pkgPath;
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   267
        }
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   268
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   269
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   270
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   271
     * Returns the inverse path for a package.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   272
     * For example, if the package is {@code java.lang},
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   273
     * the inverse path is {@code ../..}.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   274
     *
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   275
     * @param pkgElement the package element
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   276
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   277
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   278
    public static DocPath forRoot(PackageElement pkgElement) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   279
        String name = (pkgElement == null || pkgElement.isUnnamed())
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   280
                ? ""
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   281
                : pkgElement.getQualifiedName().toString();
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   282
        return new DocPath(name.replace('.', '/').replaceAll("[^/]+", ".."));
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   283
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   284
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   285
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   286
     * Returns a relative path from one package to another.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   287
     *
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   288
     * @param from the origin of the relative path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   289
     * @param to the destination of the relative path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   290
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   291
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   292
    public DocPath relativePath(PackageElement from, PackageElement to) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   293
        return forRoot(from).resolve(forPackage(to));
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   294
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   295
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   296
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   297
     * The path for the output directory for module documentation files.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   298
     * @param mdle the module
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   299
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   300
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   301
    public DocPath moduleDocFiles(ModuleElement mdle) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   302
        return createModulePath(mdle, "doc-files");
48295
c79d31ba84b9 8164407: Add module support for -link and -linkoffline javadoc option
bpatel
parents: 48029
diff changeset
   303
    }
c79d31ba84b9 8164407: Add module support for -link and -linkoffline javadoc option
bpatel
parents: 48029
diff changeset
   304
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   305
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   306
     * The path for the file for a module's frame page.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   307
     * @param mdle the module
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   308
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   309
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   310
    public DocPath moduleFrame(ModuleElement mdle) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   311
        return createModulePath(mdle, "frame.html");
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   312
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   313
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   314
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   315
     * The path for the file for a module's summary page.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   316
     * @param mdle the module
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   317
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   318
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   319
    public DocPath moduleSummary(ModuleElement mdle) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   320
        return createModulePath(mdle, "summary.html");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   321
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   322
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   323
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   324
     * The path for the file for a module's summary page.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   325
     * @param mdleName the module
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   326
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   327
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   328
    public DocPath moduleSummary(String mdleName) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   329
        return createModulePath(mdleName, "summary.html");
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   330
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   331
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   332
    /**
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   333
     * The path for the file for a module's type frame page.
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   334
     * @param mdle the module
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   335
     * @return the path
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   336
     */
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   337
    public DocPath moduleTypeFrame(ModuleElement mdle) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   338
        return createModulePath(mdle, "type-frame.html");
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   339
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   340
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   341
    private DocPath createModulePath(ModuleElement mdle, String path) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   342
        return DocPath.create(mdle.getQualifiedName() + moduleSeparator + path);
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   343
    }
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   344
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   345
    private DocPath createModulePath(String moduleName, String path) {
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48295
diff changeset
   346
        return DocPath.create(moduleName + moduleSeparator + path);
40229
09f4478d07e5 8154817: Fix the click-through navigation for modules
bpatel
parents: 36526
diff changeset
   347
    }
09f4478d07e5 8154817: Fix the click-through navigation for modules
bpatel
parents: 36526
diff changeset
   348
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   349
    /** The name of the file for the module overview frame. */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   350
    public static final DocPath MODULE_OVERVIEW_FRAME = DocPath.create("module-overview-frame.html");
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   351
22447
364fe5d83775 8016549: jdk7 javadocs are hard to read
bpatel
parents: 15723
diff changeset
   352
    /** The name of the sub-package from which resources are read. */
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   353
    public static final DocPath RESOURCES = DocPath.create("resources");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   354
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   355
    /** The name of the search javascript file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   356
    public static final DocPath SEARCH_JS = DocPath.create("search.js");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   357
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   358
    /** The name of the file for the serialized form info. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   359
    public static final DocPath SERIALIZED_FORM = DocPath.create("serialized-form.html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   360
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   361
    /** The name of the directory in which HTML versions of the source code
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   362
     *  are generated.
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   363
     */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   364
    public static final DocPath SOURCE_OUTPUT = DocPath.create("src-html");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   365
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   366
    /** The name of the default stylesheet. */
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   367
    public static final DocPath STYLESHEET = DocPath.create("stylesheet.css");
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   368
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   369
    /** The name of the tag search index file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   370
    public static final DocPath TAG_SEARCH_INDEX_JSON = DocPath.create("tag-search-index.json");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   371
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   372
    /** The name of the tag search index zip file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   373
    public static final DocPath TAG_SEARCH_INDEX_ZIP = DocPath.create("tag-search-index.zip");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   374
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   375
    /** The name of the tag search index js file. */
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   376
    public static final DocPath TAG_SEARCH_INDEX_JS = DocPath.create("tag-search-index.js");
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   377
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   378
    /** The name of the type search index file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   379
    public static final DocPath TYPE_SEARCH_INDEX_JSON = DocPath.create("type-search-index.json");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   380
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   381
    /** The name of the type search index zip file. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   382
    public static final DocPath TYPE_SEARCH_INDEX_ZIP = DocPath.create("type-search-index.zip");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   383
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   384
    /** The name of the type search index js file. */
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   385
    public static final DocPath TYPE_SEARCH_INDEX_JS = DocPath.create("type-search-index.js");
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 40511
diff changeset
   386
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   387
    /** The name of the image file for undo button on the search box. */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   388
    public static final DocPath X_IMG = DocPath.create("x.png");
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   389
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
diff changeset
   390
}