def _import_plasmas(view, read_view, token, done): init_plasmas = core_read.plasmas(read_view.ptext) existing = query_plasma.by_inj(init_plasmas, token) if (existing is None): def importer(dep): chosen = Plasma(dep, token) plasmas = plist.add(init_plasmas, chosen) done(plasmas) candidates = _find_candidates(read_view.base, token, read_view.nests) browse.list_if_needed(view, candidates, importer)
def file_list_open(view, candidates): def show_file(filename): ui_file.file(view, filename) browse.list_if_needed(view, candidates, show_file)