]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Minor changes BR_TEMPLATE_PLUGIN
authorsbh <sergey.belash@opencascade.com>
Tue, 23 Dec 2014 08:57:11 +0000 (11:57 +0300)
committersbh <sergey.belash@opencascade.com>
Tue, 23 Dec 2014 08:57:11 +0000 (11:57 +0300)
src/TemplatePlugin/features.xml.template
src/TemplatePlugin/plugin-Template_1.xml
src/TemplatePlugin/xmlGenerator.py

index 7eff0948aed9a71f1fddc425293c15832e6c50f0..86a8f46ca83ab0388a3725467bf87ee0804fd8b4 100644 (file)
@@ -1,6 +1,6 @@
 <!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
 <plugin>
-  <workbench id="TemplateWorkbench">
+  <workbench id="W{0}">
     <group id="TemplateGroup">
     <template>
       <feature
index 825cc8daaba30f0b892339e445e4b3aa1b53eb0b..e4d45553e8bb947aebb8f25a0b5a9ee46b9c2d11 100644 (file)
@@ -1,6 +1,6 @@
 <!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
 <plugin>
-  <workbench id="TemplateWorkbench">
+  <workbench id="W1">
     <group id="TemplateGroup">
       <feature
         id="TemplateFeature_1_P_1"
         icon=":pictures/wnd_undock.png">
         <source path="template_widget.xml" />
       </feature>
+      <feature
+        id="TemplateFeature_6_P_1"
+        title="Template_6 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_7_P_1"
+        title="Template_7 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_8_P_1"
+        title="Template_8 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_9_P_1"
+        title="Template_9 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_10_P_1"
+        title="Template_10 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_11_P_1"
+        title="Template_11 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_12_P_1"
+        title="Template_12 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_13_P_1"
+        title="Template_13 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_14_P_1"
+        title="Template_14 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_15_P_1"
+        title="Template_15 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_16_P_1"
+        title="Template_16 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_17_P_1"
+        title="Template_17 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_18_P_1"
+        title="Template_18 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_19_P_1"
+        title="Template_19 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
+      <feature
+        id="TemplateFeature_20_P_1"
+        title="Template_20 P_1"
+        tooltip="Generated feature for performance test"
+        icon=":pictures/wnd_undock.png">
+        <source path="template_widget.xml" />
+      </feature>
     </group>
   </workbench>
 </plugin>
\ No newline at end of file
index bd77bcfedfb78e6a3449fe185b5766bd2c47db17..04d39edba1194771749b487032ef02ce78e14f30 100644 (file)
@@ -48,6 +48,9 @@ def generateFeaturesXml(plugin_number, features_count=1):
     features_file = open(features_file_name, "w")
     skip = False
     for line in features_template_file:
+        if line.strip() == "<workbench id=\"W{0}\">":
+            features_file.write(line.format(plugin_number))
+            continue
         if line.strip() == "<template>":
             skip = True
             for n in xrange(1, features_count + 1):
@@ -69,7 +72,7 @@ def generatePluginsXml(plugins_count=1, features_count=1):
             skip = True
             for n in xrange(1, plugins_count + 1):
                 plugins_file.write(plugins_template.format(nplugin=n))
-                generateFeaturesXml(n, 5)
+                generateFeaturesXml(n, features_count)
         elif line.strip() == "</template>":
             skip = False
             continue
@@ -82,4 +85,4 @@ if __name__ == '__main__':
     args = parser.parse_args()
     print "Number of plugins: ", args.plugins
     removeFeatureFiles()
-    generatePluginsXml(args.plugins)
+    generatePluginsXml(args.plugins, 20)