src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java
changeset 59294 48b88b9c11eb
parent 54936 8c63164bd540
equal deleted inserted replaced
59293:5af9fa90cd7b 59294:48b88b9c11eb
    52 
    52 
    53     /**
    53     /**
    54      * The doclet specific writer that will output the result.
    54      * The doclet specific writer that will output the result.
    55      */
    55      */
    56     private final ModuleSummaryWriter moduleWriter;
    56     private final ModuleSummaryWriter moduleWriter;
    57 
       
    58     /**
       
    59      * The content that will be added to the module summary documentation tree.
       
    60      */
       
    61     private Content contentTree;
       
    62 
    57 
    63     /**
    58     /**
    64      * Construct a new ModuleSummaryBuilder.
    59      * Construct a new ModuleSummaryBuilder.
    65      *
    60      *
    66      * @param context  the build context.
    61      * @param context  the build context.
    99     public void build() throws DocletException {
    94     public void build() throws DocletException {
   100         if (moduleWriter == null) {
    95         if (moduleWriter == null) {
   101             //Doclet does not support this output.
    96             //Doclet does not support this output.
   102             return;
    97             return;
   103         }
    98         }
   104         buildModuleDoc(contentTree);
    99         buildModuleDoc();
   105     }
   100     }
   106 
   101 
   107     /**
   102     /**
   108      * Build the module documentation.
   103      * Build the module documentation.
   109      *
   104      *
   110      * @param contentTree the content tree to which the documentation will be added
   105      * @throws DocletException if there is a problem while building the documentation
   111      * @throws DocletException if there is a problem while building the documentation
   106      */
   112      */
   107     protected void buildModuleDoc() throws DocletException {
   113     protected void buildModuleDoc(Content contentTree) throws DocletException {
   108         Content contentTree = moduleWriter.getModuleHeader(mdle.getQualifiedName().toString());
   114         contentTree = moduleWriter.getModuleHeader(mdle.getQualifiedName().toString());
   109 
   115 
   110         buildContent();
   116         buildContent(contentTree);
   111 
   117 
   112         moduleWriter.addModuleFooter();
   118         moduleWriter.addModuleFooter(contentTree);
       
   119         moduleWriter.printDocument(contentTree);
   113         moduleWriter.printDocument(contentTree);
   120         DocFilesHandler docFilesHandler = configuration.getWriterFactory().getDocFilesHandler(mdle);
   114         DocFilesHandler docFilesHandler = configuration.getWriterFactory().getDocFilesHandler(mdle);
   121         docFilesHandler.copyDocFiles();
   115         docFilesHandler.copyDocFiles();
   122     }
   116     }
   123 
   117 
   124     /**
   118     /**
   125      * Build the content for the module doc.
   119      * Build the content for the module doc.
   126      *
   120      *
   127      * @param contentTree the content tree to which the module contents
   121      * @throws DocletException if there is a problem while building the documentation
   128      *                    will be added
   122      */
   129      * @throws DocletException if there is a problem while building the documentation
   123     protected void buildContent() throws DocletException {
   130      */
       
   131     protected void buildContent(Content contentTree) throws DocletException {
       
   132         Content moduleContentTree = moduleWriter.getContentHeader();
   124         Content moduleContentTree = moduleWriter.getContentHeader();
   133 
   125 
   134         buildModuleDescription(moduleContentTree);
   126         buildModuleDescription(moduleContentTree);
   135         buildModuleTags(moduleContentTree);
   127         buildModuleTags(moduleContentTree);
   136         buildSummary(moduleContentTree);
   128         buildSummary(moduleContentTree);
   137 
   129 
   138         moduleWriter.addModuleContent(contentTree, moduleContentTree);
   130         moduleWriter.addModuleContent(moduleContentTree);
   139     }
   131     }
   140 
   132 
   141     /**
   133     /**
   142      * Build the module summary.
   134      * Build the module summary.
   143      *
   135      *