diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala | 14 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala index 199c184bfc..a14bacb267 100644 --- a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala @@ -64,20 +64,24 @@ class HtmlFactory(val universe: doc.Universe, index: doc.Index) { new page.Index(universe, index) writeFor this + writeTemplates(page => page.writeFor(this)) + + for(letter <- index.firstLetterIndex) { + new html.page.ReferenceIndex(letter._1, index, universe) writeFor this + } + } + + def writeTemplates(writeForThis: HtmlPage => Unit): Unit = { val written = mutable.HashSet.empty[DocTemplateEntity] def writeTemplate(tpl: DocTemplateEntity): Unit = if (!(written contains tpl)) { - new page.Template(tpl) writeFor this + writeForThis(new page.Template(tpl)) written += tpl tpl.templates map (writeTemplate(_)) } writeTemplate(universe.rootPackage) - - for(letter <- index.firstLetterIndex) { - new html.page.ReferenceIndex(letter._1, index, universe) writeFor this - } } } diff --git a/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala b/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala index 95016099ff..21d6ba91a9 100644 --- a/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala +++ b/src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala @@ -34,7 +34,7 @@ abstract class HtmlPage { thisPage => protected def headers: NodeSeq /** The body of this page. */ - protected def body: NodeSeq + def body: NodeSeq /** Writes this page as a file. The file's location is relative to the generator's site root, and the encoding is * also defined by the generator. |