< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPaths.java

Print this page

        

@@ -37,16 +37,18 @@
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  *
  */
 public class DocPaths {
+    private final boolean useModuleDirectories;
     private final String moduleSeparator;
     private final Utils utils;
 
-    public DocPaths(Utils utils) {
+    public DocPaths(Utils utils, boolean useModuleDirectories) {
         this.utils = utils;
-        moduleSeparator = "/module-";
+        this.useModuleDirectories = useModuleDirectories;
+        moduleSeparator = useModuleDirectories ? "/module-" : "-";
     }
 
     public static final DocPath DOT_DOT = DocPath.create("..");
 
     /** The name of the file for all classes index. */

@@ -96,17 +98,20 @@
 
     /** The name of the default javascript file. */
     public static final DocPath JAVASCRIPT = DocPath.create("script.js");
 
     /** The name of the directory for the jQuery. */
-    public static final DocPath JQUERY_FILES = DocPath.create("script-dir");
+    public static final DocPath JQUERY_FILES = DocPath.create("jquery");
 
     /** The name of the default jQuery stylesheet file. */
     public static final DocPath JQUERY_STYLESHEET_FILE = DocPath.create("jquery-ui.css");
 
     /** The name of the default jQuery javascript file. */
-    public static final DocPath JQUERY_JS_3_4 = DocPath.create("jquery-3.4.1.js");
+    public static final DocPath JQUERY_JS_3_3 = DocPath.create("jquery-3.3.1.js");
+
+    /** The name of jquery-migrate javascript file. */
+    public static final DocPath JQUERY_MIGRATE = DocPath.create("jquery-migrate-3.0.1.js");
 
     /** The name of the default jQuery javascript file. */
     public static final DocPath JQUERY_JS = DocPath.create("jquery-ui.js");
 
     /** The name of the default jszip javascript file. */

@@ -232,12 +237,16 @@
         if (pkgElement == null || pkgElement.isUnnamed()) {
             return DocPath.empty;
         }
 
         DocPath pkgPath = DocPath.create(pkgElement.getQualifiedName().toString().replace('.', '/'));
-        ModuleElement mdle = (ModuleElement) pkgElement.getEnclosingElement();
-        return forModule(mdle).resolve(pkgPath);
+        if (useModuleDirectories) {
+            ModuleElement mdle = (ModuleElement) pkgElement.getEnclosingElement();
+            return forModule(mdle).resolve(pkgPath);
+        } else {
+            return pkgPath;
+        }
     }
 
     /**
      * Returns the inverse path for a package.
      * For example, if the package is {@code java.lang},
< prev index next >