39 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; |
38 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; |
40 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
39 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
41 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml; |
40 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml; |
42 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
41 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
43 import jdk.javadoc.internal.doclets.toolkit.Content; |
42 import jdk.javadoc.internal.doclets.toolkit.Content; |
44 import jdk.javadoc.internal.doclets.toolkit.Messages; |
43 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; |
45 import jdk.javadoc.internal.doclets.toolkit.util.DocPath; |
44 import jdk.javadoc.internal.doclets.toolkit.util.DocPath; |
46 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; |
45 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; |
47 import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException; |
|
48 |
46 |
49 /** |
47 /** |
50 * Generate the module package index for the left-hand frame in the generated output. |
48 * Generate the module package index for the left-hand frame in the generated output. |
51 * A click on the package name in this frame will update the page in the bottom |
49 * A click on the package name in this frame will update the page in the bottom |
52 * left hand frame with the listing of contents of the clicked module package. |
50 * left hand frame with the listing of contents of the clicked module package. |
64 * Construct the ModulePackageIndexFrameWriter object. |
62 * Construct the ModulePackageIndexFrameWriter object. |
65 * |
63 * |
66 * @param configuration the configuration object |
64 * @param configuration the configuration object |
67 * @param filename Name of the package index file to be generated. |
65 * @param filename Name of the package index file to be generated. |
68 */ |
66 */ |
69 public ModulePackageIndexFrameWriter(ConfigurationImpl configuration, |
67 public ModulePackageIndexFrameWriter(ConfigurationImpl configuration, DocPath filename) { |
70 DocPath filename) throws IOException { |
|
71 super(configuration, filename); |
68 super(configuration, filename); |
72 } |
69 } |
73 |
70 |
74 /** |
71 /** |
75 * Generate the module package index file. |
72 * Generate the module package index file. |
76 * @throws DocletAbortException |
73 * @throws DocFileIOException |
77 * @param configuration the configuration object |
74 * @param configuration the configuration object |
78 * @param mdle the module being documented |
75 * @param mdle the module being documented |
79 */ |
76 */ |
80 public static void generate(ConfigurationImpl configuration, ModuleElement mdle) { |
77 public static void generate(ConfigurationImpl configuration, ModuleElement mdle) throws DocFileIOException { |
81 ModulePackageIndexFrameWriter modpackgen; |
|
82 DocPath filename = DocPaths.moduleFrame(mdle); |
78 DocPath filename = DocPaths.moduleFrame(mdle); |
83 try { |
79 ModulePackageIndexFrameWriter modpackgen = new ModulePackageIndexFrameWriter(configuration, filename); |
84 modpackgen = new ModulePackageIndexFrameWriter(configuration, filename); |
80 modpackgen.buildModulePackagesIndexFile("doclet.Window_Overview", false, mdle); |
85 modpackgen.buildModulePackagesIndexFile("doclet.Window_Overview", false, mdle); |
|
86 } catch (IOException exc) { |
|
87 Messages messages = configuration.getMessages(); |
|
88 messages.error("doclet.exception_encountered", |
|
89 exc.toString(), filename); |
|
90 throw new DocletAbortException(exc); |
|
91 } |
|
92 } |
81 } |
93 |
82 |
94 /** |
83 /** |
95 * {@inheritDoc} |
84 * {@inheritDoc} |
96 */ |
85 */ |