diff options
-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 { |