diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-03-24 18:28:09 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-03-24 18:28:09 +0000 |
commit | eba318ebc4ef4c49ee2800b77b6e02c7cf19e035 (patch) | |
tree | 892d3a7f2fd45c3373516600b48988be0e0b3ac9 /src | |
parent | 67b09c4f9ff31213fc3578ca3d10b811540a10f5 (diff) | |
download | scala-eba318ebc4ef4c49ee2800b77b6e02c7cf19e035.tar.gz scala-eba318ebc4ef4c49ee2800b77b6e02c7cf19e035.tar.bz2 scala-eba318ebc4ef4c49ee2800b77b6e02c7cf19e035.zip |
Merged revisions 24573 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r24573 | dragos | 2011-03-24 18:48:14 +0100 (Thu, 24 Mar 2011) | 1 line
Added synchronous version of askStructure, needed by the IDE to avoid
deadlocks. review by odersky. ........
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 95aec8b0a2..a2426d2212 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -848,6 +848,14 @@ class Global(settings: Settings, reporter: Reporter) } } + /** Synchronous version of askStructure. */ + def getStructure(source: SourceFile, response: Response[Tree]) { + getUnit(source) match { + case Some(_) => waitLoadedTyped(source, response) + case None => getParsedEntered(source, false, response) + } + } + /** Implements CompilerControl.askLoadedTyped */ protected def waitLoadedTyped(source: SourceFile, response: Response[Tree]) { getUnit(source) match { |