Ejemplo n.º 1
0
    def __init__(
        self,
        snippet,
        parent,
        initial_text,
        start,
        end,
        visual_content,
        last_re,
        globals,
        context,
    ):
        if start is None:
            start = Position(0, 0)
        if end is None:
            end = Position(0, 0)
        self.snippet = snippet
        self._cts = 0

        self.context = context
        self.locals = {"match": last_re, "context": context}
        self.globals = globals
        self.visual_content = visual_content
        self.current_placeholder = None

        EditableTextObject.__init__(self, parent, start, end, initial_text)
Ejemplo n.º 2
0
 def __init__(self, parent, token, start=None, end=None):
     if start is not None:
         self._number = token
         EditableTextObject.__init__(self, parent, start, end)
     else:
         self._number = token.number
         EditableTextObject.__init__(self, parent, token)
     parent._tabstops[self._number] = self  # pylint:disable=protected-access