summaryrefslogblamecommitdiff
path: root/src/compiler/scala/tools/nsc/Properties.scala
blob: f88b7e82fc5852f23c392b6bef6ae88a424f312e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                            
                                


                              


                       

                                                      



                                                 





                                                                            

                   
                                                            
                                                                     
 
/* NSC -- new Scala compiler
 * Copyright 2006-2011 LAMP/EPFL
 * @author  Stephane Micheloud
 */


package scala.tools.nsc

/** Loads compiler.properties from the jar. */
object Properties extends scala.util.PropertiesTrait {
  protected def propCategory    = "compiler"
  protected def pickJarBasedOn  = classOf[Global]

  // settings based on jar properties
  def fileEndingString      = scalaPropOrElse("file.ending", ".scala|.java")
  def residentPromptString  = scalaPropOrElse("resident.prompt", "\nnsc> ")
  def shellPromptString     = scalaPropOrElse("shell.prompt", "\nscala> ")

  // settings based on system properties
  def msilLibPath           = propOrNone("msil.libpath")

  // derived values
  def isEmacsShell          = propOrEmpty("env.emacs") != ""
  def fileEndings           = fileEndingString.split("""\|""").toList
}