!7 sS progID = "#1005522"; static int maxLineLength = 500; static int maxConceptsPerTab = /*100*/10000; concepts. static JFrame frame; static JTabbedPane tabs; p { if (nempty(args)) progID = fsI(args[0]); //substance(); update(); } svoid update { //setOptAllDyn_debug = true; loadConceptsFrom(progID); print("Have " + n(l(allConcepts()), "concepts")); final Map map = litorderedmap(); for (S name : allConceptNames()) { //print("Searching " + name); L concepts = conceptsOfType(name); int n = l(concepts); bool more = n > maxConceptsPerTab; concepts = shortenList(concepts, maxConceptsPerTab); print("Rendering " + name + " (" + l(concepts) + ")"); if (nempty(concepts)) { Concept c = first(concepts); //printStruct(conceptFields(c)); //printStruct(keys(c.fieldValues)); } S text = fromLines(map(concepts, func(Concept c) { shorten(renderConcept(c), maxLineLength) })); if (more) text += "\n..."; map.put(name + " (" + l(concepts) + (more ? "/" + n : "") + ")", text); } awt { new L l; if (tabs != null) l.add(tabs.getSelectedIndex()); for (S name : keys(map)) l.addAll(ll(name, new JTextArea(map.get(name)))); frame = showFrame("Concepts of " + snippetWithTitle(progID), tabs = jtabs(l), frame); addToWindow(frame, jbutton("update", "update")); } }