Esempio n. 1
0
def plasma(view, plasmas):
    if query_regions.deps(view):
        sel_line = selection.line(view)
        dep = strings.within(sel_line[0], sel_line[1], "'", "'")
        return query_plasma.by_dep(plasmas, dep) if dep != '' else None
    else:
        inj = selection.word(view)
        return query_plasma.by_inj(plasmas, inj)
Esempio n. 2
0
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)
Esempio n. 3
0
File: files.py Progetto: boltjs/bolt
def by_inj(base, xs, inj, nests):
    plasma = query_plasma.by_inj(xs, inj)
    if (plasma != None):
        by_dep(base, plasma.dep, nests)