⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idesupport.scala

📁 JAVA 语言的函数式编程扩展
💻 SCALA
字号:
package scala.tools.nscimport scala.tools.nsc.io._trait IdeSupport extends Global with symtab.IdeSupport {  /** to do no dependency tracking */  protected def normalCompile[T](f : => T) : T = f  override def unpickleIDEHook : (( => Type) => Type) = f => normalCompile(f)  class IdeRun extends Run {    override def compiles(sym : Symbol) : Boolean = false // throw new Error    override def compileLate(file : AbstractFile) = {      // don't bother with any of the phase crap since adapt isn't supported      reloadSource(file)      normalCompile(super.compileLate(file))    }    override def stopPhase(name : String) =       name == "superaccessors" || super.stopPhase(name)  }      // load a source file without us caring about adapt.  def loadSource(file : AbstractFile) = {    val run = new IdeRun    reloadSource(file)    val source = getSourceFile(file)    normalCompile(run.compileSources(source :: Nil))    run.units.find(unit => unit.source == source)  }  object loaders1 extends scala.tools.nsc.symtab.SymbolLoaders {    lazy val global : IdeSupport.this.type = IdeSupport.this    import global._    protected override def completeClassfile(root : global.Symbol, loader : ClassfileLoader)(f : => Unit) : Unit =       global.normalCompile(f)  }  override lazy val loaders = loaders1}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -