diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/GenericRunnerSettings.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/GenericRunnerSettings.scala | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala b/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala index bd0ea4a4ba..45f8d1af5f 100644 --- a/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala +++ b/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala @@ -5,24 +5,17 @@ package scala.tools.nsc +import scala.tools.util.PathResolver + class GenericRunnerSettings(error: String => Unit) extends Settings(error) { - // A -jar option means the remainder of the command line should be - // passed to the main program in the jar. If -jar is given, jarfile - // will be set, but we also need to prepend the jar to the classpath - // since it may not be there. - val jarfile = - StringSetting( - "-jar", - "jar", - "Specify the jarfile in which to look for the main class", - "").stopProcessing() withPostSetHook (classpath prepend _.value) + def classpathURLs = new PathResolver(this) asURLs val howtorun = ChoiceSetting( "-howtorun", "how", "how to run the specified code", - List("guess", "object", "script"), + List("object", "script", "jar", "guess"), "guess") val loadfiles = @@ -38,14 +31,15 @@ class GenericRunnerSettings(error: String => Unit) extends Settings(error) { "execute a single command", "") - val savecompiled = + val save = BooleanSetting( - "-savecompiled", - "save the compiled script (assumes the code is a script)") + "-save", + "save the compiled script (assumes the code is a script)") withAbbreviation "-savecompiled" val nc = BooleanSetting( "-nc", "do not use the fsc compilation daemon") withAbbreviation "-nocompdaemon" @deprecated("Use `nc` instead") def nocompdaemon = nc + @deprecated("Use `save` instead") def savecompiled = save } |