Beispiel #1
0
class WatchWindow:
    """ window for watch expressions """

    def __init__(self):
        self.expressions = VimWindow("WATCH")
        self.expressions.dtext = "[[Type expressions here]]"
        self.results = VimWindow("RESULTS")
        self.results.dtext = "[[type \w for them to be evaluated]]"

    def create(self, where=None):
        self.expressions.create("leftabove new")
        self.results.create("vertical belowright new")

    def destroy(self):
        self.expressions.destroy()
        self.results.destroy()

    def set_result(self, line, node):
        l = len(self.results.buffer)
        for a in range(len(self.results.buffer) - 1, line):
            self.results.buffer.append("")
        errors = node.getElementsByTagName("error")
        if len(errors):
            res = "ERROR: " + str(get_child_text(errors[0], "message"))
        else:
            prop = node.getElementsByTagName("property")[0]
            res = str(get_text(prop))
            if not res:
                res = str(get_child_text(prop, "value"))
        self.results.buffer[line] = res
Beispiel #2
0
class WatchWindow:
    ''' window for watch expressions '''

    def __init__(self):
        self.expressions = VimWindow('WATCH')
        self.expressions.dtext = '[[Type expressions here]]'
        self.results = VimWindow('RESULTS')
        self.results.dtext = '[[type \w for them to be evaluated]]'

    def create(self, where=None):
        self.expressions.create('leftabove new')
        self.results.create('vertical belowright new')

    def destroy(self):
        self.expressions.destroy()
        self.results.destroy()

    def set_result(self, line, node):
        l = len(self.results.buffer)
        for a in range(len(self.results.buffer)-1, line):
            self.results.buffer.append('')
        errors = node.getElementsByTagName('error')
        if len(errors):
            res = 'ERROR: ' + str(get_child_text(errors[0], 'message'))
        else:
            prop = node.getElementsByTagName('property')[0]
            res = str(get_text(prop))
            if not res:
                res = str(get_child_text(prop, 'value'))
        self.results.buffer[line] = res
Beispiel #3
0
 def __init__(self):
     self.expressions = VimWindow("WATCH")
     self.expressions.dtext = "[[Type expressions here]]"
     self.results = VimWindow("RESULTS")
     self.results.dtext = "[[type \w for them to be evaluated]]"
Beispiel #4
0
 def __init__(self, name=None):
     VimWindow.__init__(self, name)
     self.at = 0
Beispiel #5
0
 def __init__(self, name = None):
     VimWindow.__init__(self, name)
     self.at = 0
Beispiel #6
0
 def __init__(self):
     self.expressions = VimWindow('WATCH')
     self.expressions.dtext = '[[Type expressions here]]'
     self.results = VimWindow('RESULTS')
     self.results.dtext = '[[type \w for them to be evaluated]]'