author | Laurent Bessard |
Sun, 12 May 2013 23:30:00 +0200 | |
changeset 1122 | 84de51ab40d2 |
parent 1057 | 3837e165b3f9 |
child 1262 | 7b9259945453 |
permissions | -rw-r--r-- |
815
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
1 |
|
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
2 |
from editors.TextViewer import TextViewer |
1057
3837e165b3f9
Added support for search in PythonEditor and IECCodeViewer
Laurent Bessard
parents:
815
diff
changeset
|
3 |
from plcopen.plcopen import TestTextElement |
815
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
4 |
|
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
5 |
class IECCodeViewer(TextViewer): |
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
6 |
|
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
7 |
def __del__(self): |
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
8 |
TextViewer.__del__(self) |
e4f24593a758
Adding support for extending internationalization to extensions
laurent
parents:
diff
changeset
|
9 |
if getattr(self, "_OnClose"): |
1057
3837e165b3f9
Added support for search in PythonEditor and IECCodeViewer
Laurent Bessard
parents:
815
diff
changeset
|
10 |
self._OnClose(self) |
3837e165b3f9
Added support for search in PythonEditor and IECCodeViewer
Laurent Bessard
parents:
815
diff
changeset
|
11 |
|
3837e165b3f9
Added support for search in PythonEditor and IECCodeViewer
Laurent Bessard
parents:
815
diff
changeset
|
12 |
def Search(self, criteria): |
3837e165b3f9
Added support for search in PythonEditor and IECCodeViewer
Laurent Bessard
parents:
815
diff
changeset
|
13 |
return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)] |