Beispiel #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)
Beispiel #2
0
 def check(expected, text, cursor, encloser):
     self.assertEqual(
         expected,
         strings.within(text, cursor, encloser, encloser)
     )