diff -r a7c706b9492e -r 3f2024f30553 SearchResultPanel.py --- a/SearchResultPanel.py Wed Oct 12 15:08:47 2011 +0200 +++ b/SearchResultPanel.py Wed Oct 12 23:47:48 2011 +0200 @@ -32,8 +32,12 @@ CWD = os.path.split(os.path.realpath(__file__))[0] def GenerateName(infos): - if infos[0] in ["input", "output"]: + if infos[0] in ["input", "output", "value"]: return "%s %d:" % (infos[0], infos[1]) + elif infos[0] == "range": + return "%s %d %s" % (infos[0], infos[1], infos[2]) + elif infos[0] == "struct": + return "element %d %s" % (infos[1], infos[2]) return "%s:" % infos[0] #------------------------------------------------------------------------------- @@ -191,17 +195,21 @@ children = element_infos.setdefault("children", []) for infos, start, end, text in results: - child_type = infos[1] - if child_type == "body": - child_name = "body" - if element_type == ITEM_TRANSITION: - child_type = self.ParentWindow.Controler.GetTransitionBodyType(words[1], words[2]) - elif element_type == ITEM_ACTION: - child_type = self.ParentWindow.Controler.GetActionBodyType(words[1], words[2]) + if element_type == ITEM_DATATYPE: + child_name = GenerateName(infos[1:]) + child_type = element_type + else: + child_type = infos[1] + if child_type == "body": + child_name = "body" + if element_type == ITEM_TRANSITION: + child_type = self.ParentWindow.Controler.GetTransitionBodyType(words[1], words[2]) + elif element_type == ITEM_ACTION: + child_type = self.ParentWindow.Controler.GetActionBodyType(words[1], words[2]) + else: + child_type = self.ParentWindow.Controler.GetPouBodyType(words[1]) else: - child_type = self.ParentWindow.Controler.GetPouBodyType(words[1]) - else: - child_name = GenerateName(infos[3:]) + child_name = GenerateName(infos[3:]) child_infos = {"name": child_name, "type": child_type, "data": (infos, start, end ,None),