checkpoint
[sbp.git] / src / edu / berkeley / sbp / util / GraphViz.java
index 86d0d50..ff8f46c 100644 (file)
@@ -113,6 +113,10 @@ public class GraphViz {
         public boolean isHidden();
     }
 
+    public void show() throws IOException {
+        Runtime.getRuntime().exec(new String[] { "dot", "-Tsvg" });
+    }
+
     public void dump(PrintWriter pw) {
         IdentityHashMap<Node,Node> done = new IdentityHashMap<Node,Node>();
         pw.println("digraph G { rankdir=LR; \n");
@@ -131,6 +135,7 @@ public class GraphViz {
         }
         for(Node n : ihm.values()) n.edges(pw);
         pw.println("}\n");
+        pw.flush();
     }
 
 }