sclass G22ScriptsFromAllDBsPanel { G22Utils g22utils; JObjectTable table; ReliableSingleThread rstUpdate = new(r _updateTable); transient SingleComponentPanel scpDetail = singleComponentPanel(); *(G22Utils *g22utils) {} visualize { table = swing(-> new JObjectTable); table.itemToMap = script -> joinMaps(litorderedmap( "DB" := fileName(script._concepts.conceptsDir()), "ID" := str(script.id)), g22utils.scriptToMap(script)); var tbl = table.visualize(); rstUpdate!; table.onSelect(script -> { if (script == null) scpDetail.clear(); else { var tabs = jtabs(); S editedText = script.editedText(); if (editedText != null) addTab(tabs, "Editing", jDisabledTextArea_noUndo(editedText)); if (script.text != null) addTab(tabs, "Saved", jDisabledTextArea_noUndo(script.text)); S codeForAutoRun = script.codeForAutoRun(); if (codeForAutoRun != null) addTab(tabs, "Clear for auto-run", jDisabledTextArea_noUndo(codeForAutoRun)); scpDetail.set(tabs); } }); ret withTopAndBottomMargin(jCenteredRaisedSection("Scripts from all databases", jvsplit(tbl, scpDetail))); } void _updateTable { table.setData_force(concatLists( map_pcall(g22utils.gazelleDBs(), db -> { var classFinder = g22utils.masterStuff.makeClassFinder(); var cc = newConceptsWithClassFinder(db.conceptsFile(), classFinder); cc.loadFromDisk(); ret list(cc, G22LeftArrowScript); }))); } }