summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-05-24 12:41:30 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-05-24 12:41:30 +0000
commitad451f4a55ad9cd3683ee571a9b4697ddb4d1bfa (patch)
tree1f083706cda428a44c0b5b23fc034139732dcb34
parent9e7a08fba2b9d103d50a006c23f20a83881d3b6b (diff)
downloadscala-ad451f4a55ad9cd3683ee571a9b4697ddb4d1bfa.tar.gz
scala-ad451f4a55ad9cd3683ee571a9b4697ddb4d1bfa.tar.bz2
scala-ad451f4a55ad9cd3683ee571a9b4697ddb4d1bfa.zip
Undo the changes for now.
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala4
-rw-r--r--src/compiler/scala/tools/nsc/InterpreterLoop.scala12
2 files changed, 14 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala
index 0ccc4169f4..c5fbd57354 100644
--- a/src/compiler/scala/tools/nsc/Interpreter.scala
+++ b/src/compiler/scala/tools/nsc/Interpreter.scala
@@ -172,7 +172,9 @@ class Interpreter(val settings: Settings, out: PrintWriter) {
Thread.currentThread.setContextClassLoader(classLoader)
}
- var parentClassLoader: ClassLoader = this.getClass.getClassLoader()
+ /** XXX Let's get rid of this. I believe the Eclipse plugin is
+ * the only user of it, so this should be doable. */
+ protected def parentClassLoader: ClassLoader = null
/** the previous requests this interpreter has processed */
private val prevRequests = new ArrayBuffer[Request]()
diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
index 8ba7a696b0..b15cc8c54c 100644
--- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala
+++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
@@ -65,12 +65,20 @@ class InterpreterLoop(in0: Option[BufferedReader], out: PrintWriter) {
}
}
+ /* As soon as the Eclipse plugin no longer needs it, delete uglinessxxx,
+ * parentClassLoader0, and the parentClassLoader method in Interpreter
+ */
+ var uglinessxxx: ClassLoader = _
+ def parentClassLoader0: ClassLoader = uglinessxxx
+
/** Create a new interpreter. Close the old one, if there
* is one. */
def createInterpreter() {
//closeInterpreter()
- interpreter = new Interpreter(settings, out)
+ interpreter = new Interpreter(settings, out) {
+ override protected def parentClassLoader = parentClassLoader0
+ }
interpreter.setContextClassLoader()
}
@@ -284,6 +292,8 @@ class InterpreterLoop(in0: Option[BufferedReader], out: PrintWriter) {
InteractiveReader.createDefault()
}
+ uglinessxxx = classOf[InterpreterLoop].getClassLoader
+
createInterpreter()
loadFiles(settings)