summaryrefslogtreecommitdiff
path: root/src/interactive
diff options
context:
space:
mode:
authorFrançois Garillot <francois@garillot.net>2013-09-11 15:34:34 +0200
committerFrançois Garillot <francois@garillot.net>2013-09-19 11:34:04 +0200
commit1103d48fb7bf6586f1609151bdcc74e27c9139d5 (patch)
tree6e71d6b4788f29456fa76516f77797071b41f8f6 /src/interactive
parentb0abc2d9e82ffb01fdeb423c8c10c69033d5f2dd (diff)
downloadscala-1103d48fb7bf6586f1609151bdcc74e27c9139d5.tar.gz
scala-1103d48fb7bf6586f1609151bdcc74e27c9139d5.tar.bz2
scala-1103d48fb7bf6586f1609151bdcc74e27c9139d5.zip
Add trait keeping comments across new Typer runs
Diffstat (limited to 'src/interactive')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Global.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala
index bc6df9eb25..736a1e68c4 100644
--- a/src/interactive/scala/tools/nsc/interactive/Global.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Global.scala
@@ -18,6 +18,19 @@ import scala.tools.nsc.typechecker.Analyzer
import symtab.Flags.{ACCESSOR, PARAMACCESSOR}
import scala.annotation.{ elidable, tailrec }
import scala.language.implicitConversions
+import scala.tools.nsc.typechecker.Typers
+
+/**
+ * This trait allows the IDE to have an instance of the PC that
+ * does not clear the comments table at every new typer run (those
+ * being many and close between in this context).
+ */
+
+trait CommentPreservingTypers extends Typers {
+ self: Analyzer =>
+
+ override def resetDocComments() = {}
+}
trait InteractiveScaladocAnalyzer extends InteractiveAnalyzer with ScaladocAnalyzer {
val global : Global