Dotty Documentation

0.11.0-bin-SNAPSHOT

class InteractiveDriver
extends Driver

A Driver subclass designed to be used from IDEs

[-] Constructors

InteractiveDriver ( settings: List [ String ] )

[-] Members

[+] private val compiler : Compiler
[+] private val dirClassPaths : Seq [ JFileDirectoryLookup [ _ ] ]
[+] private val myCompilationUnits : LinkedHashMap [ URI, CompilationUnit ]
[+] private var myCtx : Context
[+] private val myInitCtx : Context
[+] private val myOpenedFiles : LinkedHashMap [ URI, SourceFile ]
[+] private val myOpenedTrees : LinkedHashMap [ URI, List [ SourceTree ] ]
[+] val settings : List [ String ]
[+] private val tastySuffixes : List [ String ]
[+] private val zipClassPathClasses : Seq [ TypeName ]
[+] private val zipClassPaths : Seq [ ZipArchiveFileLookup [ _ ] ]
[+] def allTrees ( implicit ctx: Context ) : List [ SourceTree ]

All the trees for this project.

This includes the trees of the sources of this project, along with the trees that are found on this project's classpath.

[+] def allTreesContaining ( id: String ) ( implicit ctx: Context ) : List [ SourceTree ]

All the trees for this project that contain id.

This includes the trees of the sources of this project, along with the trees that are found on this project's classpath.

[+] private def classesFromDir ( dir: Path , buffer: ListBuffer [ TypeName ] ) : Unit

Adds the names of the classes that are defined in dir to buffer.

[+] private def classesFromZip ( zipFile: ZipFile , buffer: ListBuffer [ TypeName ] ) : Unit

Adds the names of the classes that are defined in zipFile to buffer.

[+] private def cleanup ( tree: Tree ) ( implicit ctx: Context ) : Unit

Remove attachments and error out completers. The goal is to avoid having a completer hanging in a typed tree which can capture the context of a previous run. Note that typed trees can have untyped or partially typed children if the source contains errors.

[+] def close ( uri: URI ) : Unit
[+] def compilationUnits : Map [ URI, CompilationUnit ]
[+] def currentCtx : Context
[+] private def dirClassPathClasses : Seq [ TypeName ]
[+] private def initialize ( ) : Unit

Initialize this driver and compiler.

This is necessary because an InteractiveDriver can be put to work without having compiled anything (for instance, resolving a symbol coming from a different compiler in this compiler). In those cases, an un-initialized compiler may crash (for instance if late-compilation is needed).

[+] def openedFiles : Map [ URI, SourceFile ]
[+] def openedTrees : Map [ URI, List [ SourceTree ] ]
[+] def run ( uri: URI , sourceCode: String ) : List [ MessageContainer ]
[+] def run ( uri: URI , source: SourceFile ) : List [ MessageContainer ]
[+] def sourceTrees ( implicit ctx: Context ) : List [ SourceTree ]

The trees for all the source files in this project.

This includes the trees for the buffers that are presently open in the IDE, and the trees from the target directory.

[+] def sourceTreesContaining ( id: String ) ( implicit ctx: Context ) : List [ SourceTree ]

The trees for all the source files in this project that contain id.

This includes the trees for the buffers that are presently open in the IDE, and the trees from the target directory.

[+] override def sourcesRequired : Boolean
[+] private def toSource ( uri: URI , sourceCode: String ) : SourceFile
[+] private def topLevelClassTrees ( topTree: Tree , source: SourceFile ) : List [ SourceTree ]
[+] private def treesFromClassName ( className: TypeName , id: String ) ( implicit ctx: Context ) : List [ SourceTree ]

The SourceTrees that define the class className and/or module className.