@@ -68,12 +68,8 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
68
68
private [this ] var myUnits : List [CompilationUnit ] = _
69
69
private [this ] var myUnitsCached : List [CompilationUnit ] = _
70
70
private [this ] var myFiles : Set [AbstractFile ] = _
71
-
72
- /** Units that are added because of source completers but that are not
73
- * compiled in current run.
74
- */
75
- val lateUnits = mutable.ListBuffer [CompilationUnit ]()
76
- var lateFiles = mutable.Set [AbstractFile ]()
71
+ private [this ] val myLateUnits = mutable.ListBuffer [CompilationUnit ]()
72
+ private [this ] var myLateFiles = mutable.Set [AbstractFile ]()
77
73
78
74
/** The compilation units currently being compiled, this may return different
79
75
* results over time.
@@ -95,6 +91,12 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
95
91
myFiles
96
92
}
97
93
94
+ /** Units that are added from source completers but that are not compiled in current run. */
95
+ def lateUnits : List [CompilationUnit ] = myLateUnits.toList
96
+
97
+ /** The source files of all late units, as a set */
98
+ def lateFiles : collection.Set [AbstractFile ] = myLateFiles
99
+
98
100
def getSource (fileName : String ): SourceFile = {
99
101
val f = new PlainFile (io.Path (fileName))
100
102
if (f.isDirectory) {
@@ -184,8 +186,8 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
184
186
def enterRoots (file : AbstractFile )(implicit ctx : Context ): Unit =
185
187
if (! files.contains(file) && ! lateFiles.contains(file)) {
186
188
val unit = new CompilationUnit (getSource(file.path))
187
- lateUnits += unit
188
- lateFiles += file
189
+ myLateUnits += unit
190
+ myLateFiles += file
189
191
enterRoots(unit)(runContext.fresh.setCompilationUnit(unit))
190
192
}
191
193
0 commit comments