sclass G22NetworksFromAllDBsPanel { G22Utils g22utils; // Each script is registered to a non-persistent Concepts object // loaded temporarily but connected to the appropriate db dir JObjectTable table; ReliableSingleThread rstUpdate = new(r _updateTable); transient SingleComponentPanel scpDetail = singleComponentPanel(); *(G22Utils *g22utils) {} visualize { table = new JObjectTable; table.itemToMap = script -> litorderedmap( "DB" := fileName(scriptToDBDir(script)), "ID" := str(script.id), "Description" := script.description); var tbl = table.visualize(); rstUpdate!; tablePopupMenuItem_top(table.table, "Open project", rThread { g22utils.masterStuff.openDatabase(table.selected()._concepts.conceptsDir()); }); table.onSelect(script -> { if (script == null) scpDetail.clear(); else { scpDetail.set(jTodo()); } }); ret withTopAndBottomMargin(jCenteredRaisedSection("Networks from all projects", jvsplit( //withRightAlignedButtons(*/tbl, /*"Show all scripts as one long text", rThread showHugeText, )*/, scpDetail))); } File networkToDBDir(G22Network network) { ret network == null ?: network._concepts.conceptsDir(); } 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, G22Network); }))); } }