summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/cmd
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-12 23:21:47 -0800
committerPaul Phillips <paulp@improving.org>2012-11-19 11:53:44 -0800
commit645c2676dd6699ac24a57dfe750386bbdb827ee8 (patch)
tree8a7391c27b58da5ef5529ce17ce3b1f3178a21e9 /src/compiler/scala/tools/cmd
parent345f937b3441f248ac9156484758fa17b1a78941 (diff)
downloadscala-645c2676dd6699ac24a57dfe750386bbdb827ee8.tar.gz
scala-645c2676dd6699ac24a57dfe750386bbdb827ee8.tar.bz2
scala-645c2676dd6699ac24a57dfe750386bbdb827ee8.zip
Commenting out unused members.
I want to get this commit into the history because the tests pass here, which demonstrates that every commented out method is not only unnecessary internally but has zero test coverage. Since I know (based on the occasional source code comment, or more often based on knowing something about other source bases) that some of these can't be removed without breaking other things, I want to at least record a snapshot of the identities of all these unused and untested methods. This commit will be reverted; then there will be another commit which removes the subset of these methods which I believe to be removable. The remainder are in great need of tests which exercise the interfaces upon which other repositories depend.
Diffstat (limited to 'src/compiler/scala/tools/cmd')
-rw-r--r--src/compiler/scala/tools/cmd/FromString.scala14
-rw-r--r--src/compiler/scala/tools/cmd/Reference.scala2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/cmd/FromString.scala b/src/compiler/scala/tools/cmd/FromString.scala
index 2a624875ee..c9df9f9145 100644
--- a/src/compiler/scala/tools/cmd/FromString.scala
+++ b/src/compiler/scala/tools/cmd/FromString.scala
@@ -25,17 +25,17 @@ abstract class FromString[+T](implicit t: ru.TypeTag[T]) extends PartialFunction
object FromString {
// We need these because we clash with the String => Path implicits.
- private def toFile(s: String) = new File(new java.io.File(s))
+ // private def toFile(s: String) = new File(new java.io.File(s))
private def toDir(s: String) = new Directory(new java.io.File(s))
/** Path related stringifiers.
*/
- val ExistingFile: FromString[File] = new FromString[File]()(tagOfFile) {
- override def isDefinedAt(s: String) = toFile(s).isFile
- def apply(s: String): File =
- if (isDefinedAt(s)) toFile(s)
- else cmd.runAndExit(println("'%s' is not an existing file." format s))
- }
+ // val ExistingFile: FromString[File] = new FromString[File]()(tagOfFile) {
+ // override def isDefinedAt(s: String) = toFile(s).isFile
+ // def apply(s: String): File =
+ // if (isDefinedAt(s)) toFile(s)
+ // else cmd.runAndExit(println("'%s' is not an existing file." format s))
+ // }
val ExistingDir: FromString[Directory] = new FromString[Directory]()(tagOfDirectory) {
override def isDefinedAt(s: String) = toDir(s).isDirectory
def apply(s: String): Directory =
diff --git a/src/compiler/scala/tools/cmd/Reference.scala b/src/compiler/scala/tools/cmd/Reference.scala
index d4f2060f81..4f1620d61a 100644
--- a/src/compiler/scala/tools/cmd/Reference.scala
+++ b/src/compiler/scala/tools/cmd/Reference.scala
@@ -26,7 +26,7 @@ trait Reference extends Spec {
def isUnaryOption(s: String) = unary contains toOpt(s)
def isBinaryOption(s: String) = binary contains toOpt(s)
def isExpandOption(s: String) = expansionMap contains toOpt(s)
- def isAnyOption(s: String) = isUnaryOption(s) || isBinaryOption(s) || isExpandOption(s)
+ // def isAnyOption(s: String) = isUnaryOption(s) || isBinaryOption(s) || isExpandOption(s)
def expandArg(arg: String) = expansionMap.getOrElse(fromOpt(arg), List(arg))