srecord noeq JG22ProjectSelector(G22Utils g22utils) is Swingable { transient JLabel lblDB; cachedVisualize { lblDB = toolTip("Currently selected project (" + f2s(g22utils.projectDir()) + ")", /*boldLabel*/(jSimpleLabel(fileName(g22utils.projectDir())))); onClick(lblDB, evt -> new PopupMenuMaker(evt, menu -> { addMenuItem(menu, "Manage or open projects...", rThread { g22utils.showUIURL("Projects")}); LS recent = takeFirst(10, g22utils.dbNamesRecentlyOpened()); for (File otherDB : listMinus(g22utils.masterStuff().openConceptDirs(), g22utils.projectDir())) { S name = fileName(otherDB); addMenuItem(menu, name + " [Open]", rThread { g22utils.masterStuff().openDatabase(otherDB) }); removeAll(recent, name, "*" + name); } for (name : recent) { S name2 = dropStarPrefix(name); File otherDB = newFile(g22utils.databasesMotherDir(), name2); if (isDirectory(otherDB)) addMenuItem(menu, name2, rThread { g22utils.masterStuff().openDatabase(otherDB, neq(name, name2)) }); } }).run()); ret lblDB; } }