3191 return self.Project.Search(criteria) |
3191 return self.Project.Search(criteria) |
3192 |
3192 |
3193 def SearchInPou(self, tagname, criteria, debug=False): |
3193 def SearchInPou(self, tagname, criteria, debug=False): |
3194 pou = self.GetEditedElement(tagname, debug) |
3194 pou = self.GetEditedElement(tagname, debug) |
3195 if pou is not None: |
3195 if pou is not None: |
3196 return pou.Search(criteria) |
3196 search_results = pou.Search(criteria, [tagname]) |
|
3197 if tagname.split("::")[0] in ['A', 'T']: |
|
3198 parent_pou_tagname = "P::%s" % (tagname.split("::")[-2]) |
|
3199 parent_pou = self.GetEditedElement(parent_pou_tagname, debug) |
|
3200 for infos, start, end, text in parent_pou.Search(criteria): |
|
3201 if infos[1] in ["var_local", "var_input", "var_output", "var_inout"]: |
|
3202 search_results.append((infos, start, end, text)) |
|
3203 return search_results |
3197 return [] |
3204 return [] |
3198 |
3205 |
3199 #------------------------------------------------------------------------------- |
3206 #------------------------------------------------------------------------------- |
3200 # Current Buffering Management Functions |
3207 # Current Buffering Management Functions |
3201 #------------------------------------------------------------------------------- |
3208 #------------------------------------------------------------------------------- |