diff options
author | michelou <michelou@epfl.ch> | 2011-07-15 21:38:03 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2011-07-15 21:38:03 +0000 |
commit | 2621ee63285808785159a3c24c9e5a5a723b8b9c (patch) | |
tree | 15d5a0863a7759f7c2178e1c9d29402fc9cd6fb8 /src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala | |
parent | a4fb15861b271c41fba8382f3b55024b5fdc8155 (diff) | |
download | scala-2621ee63285808785159a3c24c9e5a5a723b8b9c.tar.gz scala-2621ee63285808785159a3c24c9e5a5a723b8b9c.tar.bz2 scala-2621ee63285808785159a3c24c9e5a5a723b8b9c.zip |
scaladoc fixes and improvements
Changes to scaladoc include:
- fixed transformation of Code(text) into HTML tag <code> - added tool
tips for deprecated entities (classes, methods) using the 'title'
attribute - added syntax highlighting of Scala source code in generated
<pre> blocks (CSS colors are defined in lib/template.css)
Here are several examples of highlighted Scala code:
scala.App
scala.Application
scala.Enumeration
scala.Function1
scala.Function2
scala.native
scala.Option
scala.Proxy
scala.specialized
scala.throws
scala.unchecked
scala.actors.Actor
scala.annotation.deprecatedName
scala.annotation.elidable
scala.annotation.switch
scala.collection.DefaultMap
scala.collection.JavaConversions
scala.collection.JavaConverters
scala.collection.LinearSeqLike
scala.collection.MapLike
scala.collection.SetLike
scala.collection.TraversableLike
scala.collection.immutable.NumericRange
scala.collection.immutable.Range
scala.collection.immutable.Stream
scala.collection.mutable.BufferLike
scala.concurrent.pilib
scala.io.Position
scala.reflect.BeanProperty
scala.reflect.Manifest
scala.testing.Benchmark
scala.util.DynamicVariable
scala.util.control.Breaks
scala.util.control.ControlThrowable
scala.util.control.Exception
scala.util.control.TailCalls
scala.util.logging.Logged
scala.util.parsing.combinator.testing.Tester
scala.util.parsing.json.JSON
scala.util.regexp.WordExp
scala.xml.factory.LoggedNodeFactory
scala.xml.parsing.ConstructingParser
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala index 88cd589797..49e39b717f 100644 --- a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala @@ -16,12 +16,15 @@ import scala.collection._ * @author David Bernard * @author Gilles Dubochet */ class HtmlFactory(val universe: doc.Universe, index: doc.Index) { - /** The character encoding to be used for generated Scaladoc sites. This value is currently always UTF-8. */ + + /** The character encoding to be used for generated Scaladoc sites. + * This value is currently always UTF-8. */ def encoding: String = "UTF-8" def siteRoot: JFile = new JFile(universe.settings.outdir.value) - /** Generates the Scaladoc site for a model into the site root. A scaladoc site is a set of HTML and related files + /** Generates the Scaladoc site for a model into the site root. + * A scaladoc site is a set of HTML and related files * that document a model extracted from a compiler run. * @param model The model to generate in the form of a sequence of packages. */ def generate() { @@ -106,15 +109,16 @@ class HtmlFactory(val universe: doc.Universe, index: doc.Index) { } } - def writeTemplates(writeForThis: HtmlPage => Unit): Unit = { + def writeTemplates(writeForThis: HtmlPage => Unit) { val written = mutable.HashSet.empty[DocTemplateEntity] - def writeTemplate(tpl: DocTemplateEntity): Unit = + def writeTemplate(tpl: DocTemplateEntity) { if (!(written contains tpl)) { writeForThis(new page.Template(tpl)) written += tpl tpl.templates map (writeTemplate(_)) } + } writeTemplate(universe.rootPackage) } |