summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools
diff options
context:
space:
mode:
authorAntonio Cunei <antonio.cunei@epfl.ch>2009-11-30 15:46:19 +0000
committerAntonio Cunei <antonio.cunei@epfl.ch>2009-11-30 15:46:19 +0000
commit41253da6fbf3fb8aa755ebe8318a83795ced2547 (patch)
tree58aab58164397b0ac5816281f1f9f252208b5b8f /src/compiler/scala/tools
parente73ce61377783a1494be7a748693457656826d95 (diff)
downloadscala-41253da6fbf3fb8aa755ebe8318a83795ced2547.tar.gz
scala-41253da6fbf3fb8aa755ebe8318a83795ced2547.tar.bz2
scala-41253da6fbf3fb8aa755ebe8318a83795ced2547.zip
closes #1904
Diffstat (limited to 'src/compiler/scala/tools')
-rw-r--r--src/compiler/scala/tools/nsc/CompilerCommand.scala3
-rw-r--r--src/compiler/scala/tools/nsc/Settings.scala11
2 files changed, 11 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala
index ec564f17db..24842a5fcc 100644
--- a/src/compiler/scala/tools/nsc/CompilerCommand.scala
+++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala
@@ -52,6 +52,7 @@ class CompilerCommand(
/** Messages explaining usage and options */
def usageMsg = createUsageMsg("where possible standard", _.isStandard)
+ def fscUsageMsg = createUsageMsg("where possible standard", ( st => st.isStandard || st.isFscSpecific ))
def xusageMsg = createUsageMsg("Possible advanced", _.isAdvanced)
def yusageMsg = createUsageMsg("Possible private", _.isPrivate)
@@ -59,6 +60,8 @@ class CompilerCommand(
// an informative message of some sort should be printed instead.
// (note: do not add "files.isEmpty" do this list)
val stopSettings = List[(() => Boolean, (Global) => String)](
+ ((() => (settings.help.value _)() && (cmdName == "fsc")),
+ fscUsageMsg + _.pluginOptionsHelp),
(settings.help.value _, usageMsg + _.pluginOptionsHelp),
(settings.Xhelp.value _, _ => xusageMsg),
(settings.Yhelp.value _, _ => yusageMsg),
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala
index 22dd700d1e..0ae42ce707 100644
--- a/src/compiler/scala/tools/nsc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/Settings.scala
@@ -420,9 +420,10 @@ object Settings {
def dependsOn(s: Setting, value: String): this.type = { dependency = Some((s, value)); this }
def dependsOn(s: Setting): this.type = dependsOn(s, "")
- def isStandard: Boolean = !isAdvanced && !isPrivate && name != "-Y"
- def isAdvanced: Boolean = (name startsWith "-X") && name != "-X"
- def isPrivate: Boolean = (name == "-P") || ((name startsWith "-Y") && name != "-Y")
+ def isStandard: Boolean = !isFscSpecific && !isAdvanced && !isPrivate && name != "-Y"
+ def isFscSpecific: Boolean = (name == "-shutdown")
+ def isAdvanced: Boolean = (name startsWith "-X") && name != "-X"
+ def isPrivate: Boolean = (name == "-P") || ((name startsWith "-Y") && name != "-Y")
// Ordered (so we can use TreeSet)
def compare(that: Setting): Int = name compare that.name
@@ -850,6 +851,10 @@ trait ScalacSettings {
withPostSetHook(() =>
List(YwarnShadow, YwarnCatches, Xwarndeadcode, Xwarninit) foreach (_.value = true)
)
+ /**
+ * "fsc-specific" settings.
+ */
+ val fscShutdown = BooleanSetting ("-shutdown", "Shutdown the fsc daemon")
/**
* -P "Plugin" settings