ProjectController.py
changeset 1824 5765bea3dbd1
parent 1793 c2f48d791d9f
child 1828 396da88d7b5c
--- a/ProjectController.py	Thu Sep 21 16:06:51 2017 +0300
+++ b/ProjectController.py	Thu Sep 21 17:19:18 2017 +0300
@@ -177,21 +177,7 @@
         return self.ieclib_c_path
 
 
-class ProjectController(ConfigTreeNode, PLCControler):
-    """
-    This class define Root object of the confnode tree.
-    It is responsible of :
-    - Managing project directory
-    - Building project
-    - Handling PLCOpenEditor controler and view
-    - Loading user confnodes and instanciante them as children
-    - ...
-
-    """
-
-    # For root object, available Children Types are modules of the confnode packages.
-    CTNChildrenTypes = ExtractChildrenTypesFromCatalog(features.catalog)
-
+def GetProjectControllerXSD():
     XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?>
     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <xsd:element name="BeremizRoot">
@@ -219,6 +205,23 @@
       </xsd:element>
     </xsd:schema>
     """
+    return XSD
+
+
+class ProjectController(ConfigTreeNode, PLCControler):
+    """
+    This class define Root object of the confnode tree.
+    It is responsible of :
+    - Managing project directory
+    - Building project
+    - Handling PLCOpenEditor controler and view
+    - Loading user confnodes and instanciante them as children
+    - ...
+
+    """
+    # For root object, available Children Types are modules of the confnode packages.
+    CTNChildrenTypes = ExtractChildrenTypesFromCatalog(features.catalog)
+    XSD = GetProjectControllerXSD()
     EditorType = ProjectNodeEditor
     iec2c_cfg = None