From e7b362ff91904c22ccf6cebdc9816fbd7d129d7d Mon Sep 17 00:00:00 2001 From: Mirco Dotta Date: Fri, 24 Feb 2012 10:47:00 +0100 Subject: -Xplugin value passed by the Eclipse IDE are incorrectly parsed when it contains whitespaces. Assume -Xplugin is given the value C:\Programs Files\plugins\Aplugin.jar C:\Programs Files\plugins\Bplugin.jar Calling ``tryToSetFromPropertyValue`` with the above value will always result in a total mess, no matter what, because it will split the string at whitespaces. The proposed solution is to change the implementation of ``tryToSetFromPropertyValue`` to use `,` (comma) as the splitting character Further, I'm quite convinced that the current implementation of ``MultiStringSetting.tryToSetFromPropertyValue`` has never worked, that is why I did not create an overload of ``tryToSetFromPropertyValue`` where the splitting character (or string) can be passed as argument. There is also an Eclipse Scala IDE associated to this issue: http://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1000917 --- src/compiler/scala/tools/nsc/settings/MutableSettings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala index f99d1399c0..e7959f36b2 100644 --- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala @@ -533,7 +533,7 @@ class MutableSettings(val errorFn: String => Unit) Some(rest) } override def tryToSetColon(args: List[String]) = tryToSet(args) - override def tryToSetFromPropertyValue(s: String) = tryToSet(s.trim.split(" +").toList) + override def tryToSetFromPropertyValue(s: String) = tryToSet(s.trim.split(',').toList) def unparse: List[String] = value map { name + ":" + _ } withHelpSyntax(name + ":<" + arg + ">") -- cgit v1.2.3