Finished adding search in python and C files. Stripped debug code and useless comments. Close branch
--- a/BeremizIDE.py Fri Mar 22 10:57:04 2019 +0100
+++ b/BeremizIDE.py Fri Mar 22 11:09:41 2019 +0100
@@ -1034,7 +1034,6 @@
IDEFrame.ProjectTreeItemSelect(self, select_item)
def GetProjectElementWindow(self, element, tagname):
- print("BeremizIDE GetProjectElementWindo", element, tagname)
is_a_CTN_tagname = len(tagname.split("::"))==1
if is_a_CTN_tagname:
confnode = self.CTR.GetChildByName(tagname)
@@ -1059,7 +1058,6 @@
elif words[0] == "R":
return self.RecursiveProjectTreeItemSelection(root, [(words[2], ITEM_RESOURCE)])
elif not os.path.exists(words[0]):
- print(words[0])
IDEFrame.SelectProjectTreeItem(self, tagname)
def GetAddConfNodeFunction(self, name, confnode=None):
--- a/CodeFileTreeNode.py Fri Mar 22 10:57:04 2019 +0100
+++ b/CodeFileTreeNode.py Fri Mar 22 11:09:41 2019 +0100
@@ -212,9 +212,7 @@
if variable.getonchange()])
return ret
-
def CTNSearch(self, criteria):
- # TODO really search
variables = self.GetVariables()
results = []
tagname = self.CTNFullName()
--- a/IDEFrame.py Fri Mar 22 10:57:04 2019 +0100
+++ b/IDEFrame.py Fri Mar 22 11:09:41 2019 +0100
@@ -1587,7 +1587,6 @@
"R": [ITEM_CONFIGURATION, ITEM_RESOURCE]}
def SelectProjectTreeItem(self, tagname):
- print("SelectProjectTreeItem", tagname)
result = False
if self.ProjectTree is not None:
root = self.ProjectTree.GetRootItem()
@@ -1598,7 +1597,6 @@
return result
def RecursiveProjectTreeItemSelection(self, root, items):
- print("RecursiveProjectTreeItemSelection", items)
found = False
item, root_cookie = self.ProjectTree.GetFirstChild(root)
while item is not None and item.IsOk() and not found:
@@ -1822,7 +1820,6 @@
event.Skip()
def GetProjectElementWindow(self, element, tagname):
- print("GetProjectElementWindo", element, tagname)
new_window = None
if self.Controler.GetEditedElement(tagname) is not None:
new_window = None
@@ -1864,7 +1861,6 @@
return new_window
def EditProjectElement(self, element, tagname, onlyopened=False):
- print("EditProjectElement", element, tagname, onlyopened)
openedidx = self.IsOpened(tagname)
if openedidx is not None:
old_selected = self.TabsOpened.GetSelection()
@@ -2561,7 +2557,6 @@
# -------------------------------------------------------------------------------
def ShowHighlight(self, infos, start, end, highlight_type):
- print("ZZZZZZZZZZZZZ", infos, start, end, highlight_type)
self.SelectProjectTreeItem(infos[0])
if infos[1] == "name":
self.Highlights[infos[0]] = highlight_type
--- a/PLCControler.py Fri Mar 22 10:57:04 2019 +0100
+++ b/PLCControler.py Fri Mar 22 11:09:41 2019 +0100
@@ -2750,7 +2750,6 @@
def SearchInProject(self, criteria):
project_matches = self.Project.Search(criteria)
- print(project_matches)
ctn_matches = self.CTNSearch(criteria)
return project_matches + ctn_matches
--- a/controls/SearchResultPanel.py Fri Mar 22 10:57:04 2019 +0100
+++ b/controls/SearchResultPanel.py Fri Mar 22 11:09:41 2019 +0100
@@ -29,7 +29,6 @@
import wx
import wx.lib.buttons
import wx.lib.agw.customtreectrl as CT
-from pprint import pprint
from PLCControler import *
from util.BitmapLibrary import GetBitmap
@@ -296,8 +295,6 @@
self.SearchResultsTree.SetItemImage(root, self.TreeImageDict[infos["type"]])
text = None
- print("XXXXXXXXXXXXXX")
- pprint(infos)
if infos["text"] is not None:
text = infos["text"]
start, end = infos["data"][1:3]
--- a/plcopen/types_enums.py Fri Mar 22 10:57:04 2019 +0100
+++ b/plcopen/types_enums.py Fri Mar 22 11:09:41 2019 +0100
@@ -117,7 +117,6 @@
def GetElementType(tagname):
words = tagname.split("::")
- print("GetElementType",tagname, len(words))
if len(words) == 1:
return ITEM_CONFNODE
return {