diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2009-12-18 15:21:44 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2009-12-18 15:21:44 +0000 |
commit | 70ed6680a571b0ca0cae338b4af1fe965116ab61 (patch) | |
tree | 9713c12f58c194f0a8c23ca9b9d42e5f67751e33 /src/compiler | |
parent | a41d9351d532d5f39a519b4a83740f3592c2a870 (diff) | |
download | scala-70ed6680a571b0ca0cae338b4af1fe965116ab61.tar.gz scala-70ed6680a571b0ca0cae338b4af1fe965116ab61.tar.bz2 scala-70ed6680a571b0ca0cae338b4af1fe965116ab61.zip |
[scaladoc] Added option "-doc-version" to Scala...
[scaladoc] Added option "-doc-version" to Scaladoc tool (and
"docversion" attribute to ant task). Both "-doc-version" and
"-doc-title" can be set, but are not yet used in the output. No review.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/ant/Scaladoc.scala | 4 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/Settings.scala | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/ant/Scaladoc.scala b/src/compiler/scala/tools/ant/Scaladoc.scala index 4d8333ae93..78093ae95a 100644 --- a/src/compiler/scala/tools/ant/Scaladoc.scala +++ b/src/compiler/scala/tools/ant/Scaladoc.scala @@ -104,6 +104,9 @@ class Scaladoc extends MatchingTask { /** The document title of the generated HTML documentation. */ private var doctitle: Option[String] = None + /** The document version, to be added to the title. */ + private var docversion: Option[String] = None + /** Instruct the compiler to use additional parameters */ private var addParams: String = "" @@ -493,6 +496,7 @@ class Scaladoc extends MatchingTask { if (!extdirs.isEmpty) docSettings.extdirs.value = asString(getExtdirs) if (!encoding.isEmpty) docSettings.encoding.value = encoding.get if (!doctitle.isEmpty) docSettings.doctitle.value = decodeEscapes(doctitle.get) + if (!docversion.isEmpty) docSettings.docversion.value = decodeEscapes(docversion.get) docSettings.deprecation.value = deprecation docSettings.unchecked.value = unchecked log("Scaladoc params = '" + addParams + "'", Project.MSG_DEBUG) diff --git a/src/compiler/scala/tools/nsc/doc/Settings.scala b/src/compiler/scala/tools/nsc/doc/Settings.scala index 87d5eca645..75aff8e4bd 100644 --- a/src/compiler/scala/tools/nsc/doc/Settings.scala +++ b/src/compiler/scala/tools/nsc/doc/Settings.scala @@ -10,16 +10,23 @@ package doc import java.io.File import java.lang.System +/** An extended version of compiler settings, with additional Scaladoc-specific options. + * @param error A function that prints a string to the appropriate error stream. */ class Settings(error: String => Unit) extends scala.tools.nsc.Settings(error) { - /** scaladoc specific options */ - val docformat = ChoiceSetting ("-doc-format", "Selects to which format documentation is rendered", List("html"), "html") - val doctitle = StringSetting ("-doc-title", "doc-title", "Include title for the overview page", "Scala 2 API") + /** A setting that defines in which format the documentation is output. ''Note:'' this setting is currently always + * `html`. */ + val docformat = ChoiceSetting ("-doc-format", "Selects in which format documentation is rendered", List("html"), "html") - // working around issue described in r18708. - suppressVTWarn.value = true + /** A setting that defines the overall title of the documentation, typically the name of the library being + * documented. 'Note:'' This setting is currently not used. */ + val doctitle = StringSetting ("-doc-title", "doc-title", "The overall name of the Scaladoc site", "") + /** A setting that defines the overall version number of the documentation, typically the version of the library being + * documented. 'Note:'' This setting is currently not used. */ + val docversion = StringSetting ("-doc-version", "doc-version", "An optional version number, to be appended to the title", "") // working around issue described in r18708. suppressVTWarn.value = true + } |