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
Example #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
Example #3
0
 def __init__(self, parent, token, start = None, end = None):
     if start is not None:
         self._no = token
         EditableTextObject.__init__(self, parent, start, end)
     else:
         self._no = token.no
         EditableTextObject.__init__(self, parent, token)
     parent._tabstops[self._no] = self
    def __init__(self, snippet, parent, initial_text,
            start, end, visual_content, last_re, globals):
        if start is None:
            start = Position(0, 0)
        if end is None:
            end = Position(0, 0)
        self.snippet = snippet
        self._cts = 0

        self.locals = {"match" : last_re}
        self.globals = globals
        self.visual_content = visual_content

        EditableTextObject.__init__(self, parent, start, end, initial_text)
Example #5
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.locals = {'match': last_re, 'context': context}
        self.globals = globals
        self.visual_content = visual_content

        EditableTextObject.__init__(self, parent, start, end, initial_text)
Example #6
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)
Example #7
0
    def __init__(self, parent, indent, initial_text, start, end, visual_content, last_re, globals):
        if start is None:
            start = Position(0,0)
        if end is None:
            end = Position(0,0)

        self._cts = 0

        self.locals = {"match" : last_re}
        self.globals = globals
        self.visual_content = visual_content

        EditableTextObject.__init__(self, parent, start, end, initial_text)

        TOParser(self, initial_text, indent).parse(True)

        self.update_textobjects()
Example #8
0
    def __init__(self, parent, indent, initial_text, start, end, visual_content, last_re, globals):
        if start is None:
            start = Position(0,0)
        if end is None:
            end = Position(0,0)

        self._cts = 0

        self.locals = {"match" : last_re}
        self.globals = globals
        self.visual_content = visual_content

        EditableTextObject.__init__(self, parent, start, end, initial_text)

        TOParser(self, initial_text, indent).parse(True)

        self.update_textobjects()