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


                              

                       

                                                          
                                                      

                                                

                                     

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

package scala.tools.nsc

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

  // settings based on jar properties
  def residentPromptString = scalaPropOrElse("resident.prompt", "\nnsc> ")
  def shellPromptString    = scalaPropOrElse("shell.prompt", "\nscala> ")
  def shellInterruptedString = scalaPropOrElse("shell.interrupted", ":quit\n")

  // derived values
  def isEmacsShell         = propOrEmpty("env.emacs") != ""
}