From 11ee847d384dcd0f45295380809f66961ebe25a3 Mon Sep 17 00:00:00 2001 From: Miles Sabin Date: Fri, 31 Jul 2009 21:31:02 +0000 Subject: Added notification to BuildManager clients of f... Added notification to BuildManager clients of files as they're compiled allowing IDEs to clear persistent compilation related state; added a mechanism to request a type tree corresponding to an entire compilation unit. --- src/compiler/scala/tools/nsc/interactive/CompilerControl.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/compiler/scala/tools/nsc/interactive/CompilerControl.scala') diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala index 942a6f5c86..b22cc9098d 100644 --- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala +++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala @@ -82,6 +82,11 @@ trait CompilerControl { self: Global => override def toString = "typeat "+pos.source+" "+pos.show } + def askType(source: SourceFile, forceReload: Boolean, result: Response[Tree]) = + scheduler postWorkItem new WorkItem { + def apply() = self.getTypedTree(source, forceReload, result) + } + /** Set sync var `result' to list of members that are visible * as members of the tree enclosing `pos`, possibly reachable by an implicit. * - if `selection` is false, as identifiers in the scope enclosing `pos` -- cgit v1.2.3