langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
changeset 40587 1c355ea550ed
parent 40303 96a1226aca18
child 41157 b235a429089a
equal deleted inserted replaced
40519:e17429a7e843 40587:1c355ea550ed
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.javadoc.internal.doclets.formats.html;
    26 package jdk.javadoc.internal.doclets.formats.html;
    27 
    27 
    28 import java.io.*;
       
    29 import java.util.ArrayList;
    28 import java.util.ArrayList;
    30 import java.util.EnumMap;
    29 import java.util.EnumMap;
    31 import java.util.List;
    30 import java.util.List;
    32 import java.util.Map;
    31 import java.util.Map;
    33 
    32 
    44 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
    43 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
    45 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
    44 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
    46 import jdk.javadoc.internal.doclets.toolkit.Content;
    45 import jdk.javadoc.internal.doclets.toolkit.Content;
    47 import jdk.javadoc.internal.doclets.toolkit.ModuleSummaryWriter;
    46 import jdk.javadoc.internal.doclets.toolkit.ModuleSummaryWriter;
    48 import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
    47 import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
       
    48 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
    49 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
    49 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
    50 import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
       
    51 
    50 
    52 /**
    51 /**
    53  * Class to generate file for each module contents in the right-hand
    52  * Class to generate file for each module contents in the right-hand
    54  * frame. This will list all the packages and Class Kinds in the module. A click on any
    53  * frame. This will list all the packages and Class Kinds in the module. A click on any
    55  * class-kind will update the frame with the clicked class-kind page. A click on any
    54  * class-kind will update the frame with the clicked class-kind page. A click on any
   513      * Add summary details to the navigation bar.
   512      * Add summary details to the navigation bar.
   514      *
   513      *
   515      * @param subDiv the content tree to which the summary detail links will be added
   514      * @param subDiv the content tree to which the summary detail links will be added
   516      */
   515      */
   517     protected void addSummaryDetailLinks(Content subDiv) {
   516     protected void addSummaryDetailLinks(Content subDiv) {
   518         try {
   517         Content div = HtmlTree.DIV(getNavSummaryLinks());
   519             Content div = HtmlTree.DIV(getNavSummaryLinks());
   518         subDiv.addContent(div);
   520             subDiv.addContent(div);
       
   521         } catch (Exception e) {
       
   522             throw new DocletAbortException(e);
       
   523         }
       
   524     }
   519     }
   525 
   520 
   526     /**
   521     /**
   527      * Get summary links for navigation bar.
   522      * Get summary links for navigation bar.
   528      *
   523      *
   529      * @return the content tree for the navigation summary links
   524      * @return the content tree for the navigation summary links
   530      */
   525      */
   531     protected Content getNavSummaryLinks() throws Exception {
   526     protected Content getNavSummaryLinks() {
   532         Content li = HtmlTree.LI(contents.moduleSubNavLabel);
   527         Content li = HtmlTree.LI(contents.moduleSubNavLabel);
   533         li.addContent(Contents.SPACE);
   528         li.addContent(Contents.SPACE);
   534         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
   529         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
   535         Content liNav = new HtmlTree(HtmlTag.LI);
   530         Content liNav = new HtmlTree(HtmlTag.LI);
   536         liNav.addContent(!utils.getBody(mdle).isEmpty() && !configuration.nocomment
   531         liNav.addContent(!utils.getBody(mdle).isEmpty() && !configuration.nocomment
   589     }
   584     }
   590 
   585 
   591     /**
   586     /**
   592      * {@inheritDoc}
   587      * {@inheritDoc}
   593      */
   588      */
   594     public void printDocument(Content contentTree) throws IOException {
   589     @Override
       
   590     public void printDocument(Content contentTree) throws DocFileIOException {
   595         printHtmlDocument(configuration.metakeywords.getMetaKeywordsForModule(mdle),
   591         printHtmlDocument(configuration.metakeywords.getMetaKeywordsForModule(mdle),
   596                 true, contentTree);
   592                 true, contentTree);
   597     }
   593     }
   598 
   594 
   599     /**
   595     /**