From fa34ce4700548a8d913d8aef71e8c86f668e498f Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 8 Mar 2010 18:46:35 +0000 Subject: Changed partest ant task not to use reflection,... Changed partest ant task not to use reflection, instead using the path with which scala was invoked. No review. --- src/compiler/scala/tools/ant/sabbus/TaskArgs.scala | 38 +++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala b/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala index 6526f67254..20a6791648 100644 --- a/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala +++ b/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala @@ -14,22 +14,10 @@ import java.io.File import org.apache.tools.ant.Task import org.apache.tools.ant.types.{Path, Reference} -trait TaskArgs { this: Task => +trait CompilationPathProperty { + this: Task => - def setId(input: String) { - id = Some(input) - } - - def setParams(input: String) { - params = params match { - case None => Some(input) - case Some(ps) => Some(ps + " " + input) - } - } - - def setTarget(input: String) { - compTarget = Some(input) - } + protected var compilationPath: Option[Path] = None def setCompilationPath(input: Path) { if (compilationPath.isEmpty) compilationPath = Some(input) @@ -44,6 +32,25 @@ trait TaskArgs { this: Task => def setCompilationPathRef(input: Reference) { createCompilationPath.setRefid(input) } +} + +trait TaskArgs extends CompilationPathProperty { + this: Task => + + def setId(input: String) { + id = Some(input) + } + + def setParams(input: String) { + params = params match { + case None => Some(input) + case Some(ps) => Some(ps + " " + input) + } + } + + def setTarget(input: String) { + compTarget = Some(input) + } def setSrcPath(input: Path) { if (sourcePath.isEmpty) sourcePath = Some(input) @@ -80,7 +87,6 @@ trait TaskArgs { this: Task => protected var id: Option[String] = None protected var params: Option[String] = None protected var compTarget: Option[String] = None - protected var compilationPath: Option[Path] = None protected var sourcePath: Option[Path] = None protected var compilerPath: Option[Path] = None protected var destinationDir: Option[File] = None -- cgit v1.2.3