mirror of https://github.com/sbt/sbt.git
2.8 compatibility fix for graph generation
git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@999 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
parent
b70521ac7a
commit
26103f19d4
|
|
@ -32,10 +32,10 @@ object DotGraph
|
|||
def generateGraph[Key, Value](fileName: String, graphName: String, graph: Iterable[(Key, scala.collection.Set[Value])],
|
||||
keyToString: Key => String, valueToString: Value => String) =
|
||||
{
|
||||
import scala.collection.mutable.{HashMap, MultiMap, Set}
|
||||
val mappedGraph = new HashMap[String, Set[String]] with MultiMap[String, String]
|
||||
import scala.collection.mutable.{HashMap, HashSet}
|
||||
val mappedGraph = new HashMap[String, HashSet[String]]
|
||||
for( (key, values) <- graph; keyString = keyToString(key); value <- values)
|
||||
mappedGraph.add(keyString, valueToString(value))
|
||||
mappedGraph.getOrElseUpdate(keyString, new HashSet[String]) += valueToString(value)
|
||||
|
||||
FileUtilities.write(new File(outputDir, fileName), log) { (writer: Writer) =>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue