editors/IECCodeViewer.py
author Laurent Bessard
Tue, 10 Sep 2013 10:36:44 +0200
changeset 1311 85ca4fa0720b
parent 1262 7b9259945453
child 1511 91538d0c242c
permissions -rw-r--r--
Fixed bug with return type in elements that don't need return type tree and dimension

from editors.TextViewer import TextViewer
from plcopen.plcopen import TestTextElement

class IECCodeViewer(TextViewer):
    
    def __del__(self):
        TextViewer.__del__(self)
        if getattr(self, "_OnClose"):
            self._OnClose(self)
    
    def Paste(self):
        if self.Controler is not None:
            TextViewer.Paste(self)
    
    def Search(self, criteria):
        return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)]