summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-04-18 15:09:52 +0000
committermichelou <michelou@epfl.ch>2007-04-18 15:09:52 +0000
commitd3529d9a6e03f8562138ecb5844ef9ff6bb66b06 (patch)
treecdacd10d8c4dfdb317e001369414d30eee1c1fec /src
parent2b00a2580c15575378ee65a6894d6803bc4d3061 (diff)
downloadscala-d3529d9a6e03f8562138ecb5844ef9ff6bb66b06.tar.gz
scala-d3529d9a6e03f8562138ecb5844ef9ff6bb66b06.tar.bz2
scala-d3529d9a6e03f8562138ecb5844ef9ff6bb66b06.zip
fixed bug #1054, added svn props
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/doc/DocDriver.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/DocGenerator.scala3
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelAdditions.scala12
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelExtractor.scala19
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelFrames.scala28
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelToXML.scala9
6 files changed, 54 insertions, 19 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/DocDriver.scala b/src/compiler/scala/tools/nsc/doc/DocDriver.scala
index e527c558cf..89e5be0b77 100644
--- a/src/compiler/scala/tools/nsc/doc/DocDriver.scala
+++ b/src/compiler/scala/tools/nsc/doc/DocDriver.scala
@@ -2,7 +2,7 @@
* Copyright 2007-2008 LAMP/EPFL
* @author Sean McDirmid
*/
-// $Id: $
+// $Id$
package scala.tools.nsc.doc;
diff --git a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
index ac1f48483b..6933151770 100644
--- a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
+++ b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
@@ -1177,7 +1177,8 @@ abstract class DocGenerator extends Models {
def sym = definitions.getClass("scala.runtime.BoxedNumber")
def descr = boxedValDescr(sym)
}
- val rsrcdir = "scala/tools/nsc/doc/".replace('/', File.separatorChar)
+ // The name of a resource is a '/'-separated path name that identifies the resource.
+ val rsrcdir = "scala/tools/nsc/doc/"
for (val base <- List("style.css", "script.js")) {
try {
val in = loader.getResourceAsStream(rsrcdir + base)
diff --git a/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala b/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
index cba6de48b8..02dcbfda40 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
@@ -1,5 +1,15 @@
-package scala.tools.nsc.doc;
+/* NSC -- new Scala compiler
+ * Copyright 2007-2008 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
+package scala.tools.nsc.doc
+
+/**
+ * @author Sean McDirmid
+ * @version 1.0
+ */
class ModelAdditions(val global : Global) {
import global._;
import definitions._;
diff --git a/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala b/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
index 3ea636f02b..1cf4914081 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
@@ -1,11 +1,20 @@
-package scala.tools.nsc.doc;
-import scala.collection.jcl;
+/* NSC -- new Scala compiler
+ * Copyright 2007-2008 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
+
+package scala.tools.nsc.doc
+
+import scala.collection.jcl
import compat.Platform.{EOL => LINE_SEPARATOR}
-/** This class attempts to reverse engineer source code intent from compiler symbol objects
- * @author Sean McDirmid
- */
+/** This class attempts to reverse engineer source code intent from compiler
+ * symbol objects.
+ *
+ * @author Sean McDirmid
+ */
trait ModelExtractor {
val global : Global;
import global._;
diff --git a/src/compiler/scala/tools/nsc/doc/ModelFrames.scala b/src/compiler/scala/tools/nsc/doc/ModelFrames.scala
index 917895e1ef..392ea938f2 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelFrames.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelFrames.scala
@@ -1,9 +1,16 @@
-package scala.tools.nsc.doc;
+/* NSC -- new Scala compiler
+ * Copyright 2005-2007 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
-import compat.Platform.{EOL => LINE_SEPARATOR};
-import scala.xml._;
-import java.io.{File,FileWriter};
-import scala.collection.jcl;
+package scala.tools.nsc.doc
+
+import java.io.{File, FileWriter}
+
+import scala.collection.jcl
+import scala.compat.Platform.{EOL => LINE_SEPARATOR}
+import scala.xml._
/** This class provides HTML document framing functionality.
*
@@ -25,14 +32,14 @@ trait ModelFrames extends ModelExtractor {
def rootTitle = <div class="page-title"> Scala 2<br/>API Specification</div>;
def rootDesc = <p>This document is the API specification for Scala 2.</p>;
- final def hasLink(sym : global.Symbol) : Boolean = {
+ final def hasLink(sym: global.Symbol) : Boolean = {
if (sym == global.NoSymbol) false;
else if (hasLink0(sym)) true;
else {
hasLink(decode(sym.owner));
}
}
- def hasLink0(sym : global.Symbol) : Boolean = true;
+ def hasLink0(sym: global.Symbol): Boolean = true;
abstract class Frame extends UrlContext {
{ // just save.
@@ -131,7 +138,7 @@ trait ModelFrames extends ModelExtractor {
})
}
}
- protected def rootFor(sym : global.Symbol) = "";
+ protected def rootFor(sym: global.Symbol) = "";
private val doctitle: NodeSeq =
<div class="doctitle-larger">{load(documentTitle)}</div>;
@@ -300,8 +307,9 @@ trait ModelFrames extends ModelExtractor {
private val loader = getClass().getClassLoader()
def copyResources = {
- import java.io._;
- val rsrcdir = "scala/tools/nsc/doc/".replace('/', File.separatorChar)
+ import java.io._
+ // The name of a resource is a '/'-separated path name that identifies the resource.
+ val rsrcdir = "scala/tools/nsc/doc/"
for (val base <- List("style.css", "script.js")) {
try {
val in = loader.getResourceAsStream(rsrcdir + base)
diff --git a/src/compiler/scala/tools/nsc/doc/ModelToXML.scala b/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
index c43a215a22..cc4b7848b2 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
@@ -1,4 +1,11 @@
-package scala.tools.nsc.doc;
+/* NSC -- new Scala compiler
+ * Copyright 2007-2008 LAMP/EPFL
+ * @author Sean McDirmid
+ */
+// $Id$
+
+package scala.tools.nsc.doc
+
import scala.xml._
/** This class has functionality to format source code models as XML blocks.