fix 'inspect' not showing setting value

This commit is contained in:
Mark Harrah 2011-06-15 19:08:49 -04:00
parent 0fa5b85736
commit 1248830e2c
1 changed files with 11 additions and 8 deletions

View File

@ -214,14 +214,17 @@ object Project extends Init[Scope] with ProjectExtra
lazy val clazz = key.manifest.erasure lazy val clazz = key.manifest.erasure
lazy val firstType = key.manifest.typeArguments.head lazy val firstType = key.manifest.typeArguments.head
val value = val value =
if(structure.data.get(scope, key).isEmpty) structure.data.get(scope, key) match
"No entry for key." {
else if(clazz == classOf[Task[_]]) case None => "No entry for key."
"Task of type " + firstType.toString case Some(v) =>
if(clazz == classOf[Task[_]])
"Task: " + firstType.toString
else if(clazz == classOf[InputTask[_]]) else if(clazz == classOf[InputTask[_]])
"Input task of type " + firstType.toString "Input task: " + firstType.toString
else else
"Setting of type " + key.manifest.toString "Setting: " + key.manifest.toString + " = " + v.toString
}
val description = key.description match { case Some(desc) => "Description:\n\t" + desc + "\n"; case None => "" } val description = key.description match { case Some(desc) => "Description:\n\t" + desc + "\n"; case None => "" }
val definedIn = structure.data.definingScope(scope, key) match { val definedIn = structure.data.definingScope(scope, key) match {