diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-26 04:59:58 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-26 04:59:58 +0000 |
commit | edcf568e6136ddcfb73762c0ee1aef8d5920315f (patch) | |
tree | 77bd0faec14e7165d7544af572a39abd9fd0f814 /src | |
parent | 2bf117c3b2545856ace3d2dd23e5fffad199bac9 (diff) | |
download | scala-edcf568e6136ddcfb73762c0ee1aef8d5920315f.tar.gz scala-edcf568e6136ddcfb73762c0ee1aef8d5920315f.tar.bz2 scala-edcf568e6136ddcfb73762c0ee1aef8d5920315f.zip |
Tweaked help output a little further so -Y isn'...
Tweaked help output a little further so -Y isn't visible except to those
who consider themselves advanced. No review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/settings/AbsSettings.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/AbsSettings.scala b/src/compiler/scala/tools/nsc/settings/AbsSettings.scala index fc9d969c25..75e2c5ce11 100644 --- a/src/compiler/scala/tools/nsc/settings/AbsSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/AbsSettings.scala @@ -107,10 +107,12 @@ trait AbsSettings { */ def tryToSetFromPropertyValue(s: String): Unit = tryToSet(s :: Nil) - def isCategory: Boolean = List("-X", "-Y", "-P") contains name - def isAdvanced: Boolean = (name startsWith "-X") && name != "-X" - def isPrivate: Boolean = (name startsWith "-Y") && name != "-Y" - def isStandard: Boolean = !isAdvanced && !isPrivate + /** These categorizations are so the help output shows -X and -P among + * the standard options and -Y among the advanced options. + */ + def isAdvanced = name match { case "-Y" => true ; case "-X" => false ; case _ => name startsWith "-X" } + def isPrivate = name match { case "-Y" => false ; case _ => name startsWith "-Y" } + def isStandard = !isAdvanced && !isPrivate def compare(that: Setting): Int = name compare that.name |