diff options
author | Paul Phillips <paulp@improving.org> | 2011-04-07 17:43:41 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-04-07 17:43:41 +0000 |
commit | caee04079fb8ed40a1458cf24649fad9d80a85c1 (patch) | |
tree | bc8fa7a77760582d91f135dcf72ff15a89ea4984 /src/compiler/scala/tools/nsc/interpreter/IMain.scala | |
parent | 42dbce32957e048173c1749697d6bf9273581030 (diff) | |
download | scala-caee04079fb8ed40a1458cf24649fad9d80a85c1.tar.gz scala-caee04079fb8ed40a1458cf24649fad9d80a85c1.tar.bz2 scala-caee04079fb8ed40a1458cf24649fad9d80a85c1.zip |
Made power mode more configurable.
long-term configuration answer, but what I have any chance of doing
before 2.9 ships.
// file to interpret when entering power mode instead of default
-Dscala.repl.power.initcode=/path/to/file // file holding banner to
display instead of default -Dscala.repl.power.banner=/path/to/file
No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/IMain.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/IMain.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/IMain.scala b/src/compiler/scala/tools/nsc/interpreter/IMain.scala index 9dbcf37557..4e405de3b2 100644 --- a/src/compiler/scala/tools/nsc/interpreter/IMain.scala +++ b/src/compiler/scala/tools/nsc/interpreter/IMain.scala @@ -288,7 +288,7 @@ class IMain(val settings: Settings, protected val out: PrintWriter) { } } } - private def loadByName(s: String): Class[_] = + private def loadByName(s: String): JClass = (classLoader tryToInitializeClass s) getOrElse sys.error("Failed to load expected class: '" + s + "'") protected def parentClassLoader: ClassLoader = @@ -994,7 +994,7 @@ class IMain(val settings: Settings, protected val out: PrintWriter) { def valueOfTerm(id: String): Option[AnyRef] = requestForIdent(id) flatMap (_.getEval) - def classOfTerm(id: String): Option[Class[_]] = + def classOfTerm(id: String): Option[JClass] = valueOfTerm(id) map (_.getClass) def typeOfTerm(id: String): Option[Type] = newTermName(id) match { @@ -1004,7 +1004,7 @@ class IMain(val settings: Settings, protected val out: PrintWriter) { def symbolOfTerm(id: String): Symbol = requestForIdent(id) flatMap (_.definedSymbols get newTermName(id)) getOrElse NoSymbol - def runtimeClassAndTypeOfTerm(id: String): Option[(Class[_], Type)] = { + def runtimeClassAndTypeOfTerm(id: String): Option[(JClass, Type)] = { for { clazz <- classOfTerm(id) tpe <- runtimeTypeOfTerm(id) |