From dca1648c55232673cd971d16f2f9e3f842b04198 Mon Sep 17 00:00:00 2001 From: sivaji Date: Fri, 8 Jun 2007 14:48:39 +0000 Subject: [PATCH] *Tasknodes in the unified task graph are clickable now. --- Robust/src/Interface/WebInterface.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Robust/src/Interface/WebInterface.java b/Robust/src/Interface/WebInterface.java index 534fba41..759a669b 100644 --- a/Robust/src/Interface/WebInterface.java +++ b/Robust/src/Interface/WebInterface.java @@ -230,29 +230,33 @@ public class WebInterface { private String unifiedTaskGraph(OutputStream out, HTTPResponse resp){ Set objects=taskgraph.getAllTaskNodes(); File file=new File("UnifiedTaskGraph.dot"); - /*File mapfile; String str; Vector namers=new Vector(); namers.add(new Namer()); namers.add(new TaskNodeNamer()); -*/ + try { //Generate jpg Runtime r=Runtime.getRuntime(); FileOutputStream dotstream=new FileOutputStream(file,false); - FlagState.DOTVisitor.visit(dotstream, objects); + FlagState.DOTVisitor.visit(dotstream, objects, namers); dotstream.close(); - Process p=r.exec("dot -Tjpg -oUnifiedTaskGraph.jpg UnifiedTaskGraph.dot"); + Process p=r.exec("dot -Tjpg -oUnifiedTaskGraph.jpg -Tcmapx -oUnifiedTaskGraph.map UnifiedTaskGraph.dot"); p.waitFor(); p=r.exec("dot -Tps UnifiedTaskGraph.dot -oUnifiedTaskGraph.ps"); p.waitFor(); + File mapfile=new File("UnifiedTaskGraph.map"); + BufferedReader mapbr=new BufferedReader(new FileReader(mapfile)); PrintWriter pw=new PrintWriter(out); pw.println("ps
"); // pw.println(""); - pw.println(""); - + pw.println(""); + + while((str=mapbr.readLine())!=null) + pw.println(str); + pw.flush(); } catch (Exception e) {e.printStackTrace();System.exit(-1);} return null; -- 2.34.1