35 |
35 |
36 from PLCControler import UndoBuffer |
36 from PLCControler import UndoBuffer |
37 from ConfigTreeNode import XSDSchemaErrorMessage |
37 from ConfigTreeNode import XSDSchemaErrorMessage |
38 |
38 |
39 from plcopen.plcopen import TestTextElement |
39 from plcopen.plcopen import TestTextElement |
|
40 from editors.CodeFileEditor import GetSectionsText |
40 |
41 |
41 CODEFILE_XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?> |
42 CODEFILE_XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?> |
42 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
43 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
43 xmlns:xhtml="http://www.w3.org/1999/xhtml"> |
44 xmlns:xhtml="http://www.w3.org/1999/xhtml"> |
44 <xsd:element name="%(codefile_name)s"> |
45 <xsd:element name="%(codefile_name)s"> |
219 tagname = self.CTNFullName() |
220 tagname = self.CTNFullName() |
220 for index, var in enumerate(variables): |
221 for index, var in enumerate(variables): |
221 varname = var["Name"] |
222 varname = var["Name"] |
222 results.extend([((tagname, "var_inout", index, "name"),) + result |
223 results.extend([((tagname, "var_inout", index, "name"),) + result |
223 for result in TestTextElement(varname, criteria)]) |
224 for result in TestTextElement(varname, criteria)]) |
224 print("FFFFFFFFFF", results) |
225 results.extend([((tagname, "body"),) + result |
225 return results + [((self.CTNFullName(),"var_inout",1,"name"), (0,2),(0,4),"a_cow"), |
226 for result in TestTextElement( |
226 ((self.CTNFullName(),"body"), (1,12),(1,15),"Bitch I'm a cow !")] |
227 GetSectionsText(self, lambda x:""), criteria)]) |
|
228 return results |
227 |
229 |
228 # ------------------------------------------------------------------------------- |
230 # ------------------------------------------------------------------------------- |
229 # Current Buffering Management Functions |
231 # Current Buffering Management Functions |
230 # ------------------------------------------------------------------------------- |
232 # ------------------------------------------------------------------------------- |
231 |
233 |