!752 static JTable tbl; static int delay = 3000; p-substance { tbl = showTable("All Injections"); tablePopupMenu(tbl, voidfunc(JPopupMenu menu, final int row) { menu.add(jmenuItem("Kill VM", r { S port = str(getTableLineAsMap(tbl, row).get("VM")); if (isInteger(port)) killVM(parseInt(port)); })); }); installTimer(tbl, runnable { updateList(); }, delay, 0); hideConsole(); } static new MonoThread update; static void updateList() { update.run(r { new L l; for (DialogIO vm : talkToAllVMs()) { pcall { int vmPort = vm.getPort(); S x = vm.ask("get injections"); print("VM " + vmPort + " injections: " + x); L injections = cast safeUnstructure(x); for (O inj : injections) { S progID = formatSnippetID((S) get(inj, "progID")); l.add(litorderedmap( "Program name", getSnippetTitle(progID), "Program ID", progID, "VM", vmPort, "Injection ID", get(inj, "injectionID"), "More info", (boolean) get(inj, "mainDone") ? "main done" : "main running")); } } vm.close(); } dataToTable(tbl, l); setFrameTitle(tbl, n(countDistinct(l, "VM"), "VMs") + " / " + n(l(l), "injections")); }); }