]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Copy, Cut, Paste under right click above sysdyn components and modules (refs #3647...
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 25 Sep 2012 11:37:28 +0000 (11:37 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 25 Sep 2012 11:37:28 +0000 (11:37 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@25859 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/plugin.xml

index 7893838401c16dd0eff1a1ea1112aff114c2797d..b1b06f445a5337a2d6d72983b6d38ae5bf39446f 100644 (file)
                </with>\r
             </visibleWhen>\r
          </dynamic>\r
+         <command\r
+               commandId="org.eclipse.ui.edit.copy"\r
+               label="Copy"\r
+               style="push">\r
+            <visibleWhen\r
+                  checkEnabled="true">\r
+               <with\r
+                     variable="selection">\r
+                  <or>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                  </or>\r
+               </with>\r
+            </visibleWhen>\r
+         </command>\r
+         <command\r
+               commandId="org.eclipse.ui.edit.paste"\r
+               label="Paste"\r
+               style="push">\r
+            <visibleWhen\r
+                  checkEnabled="true">\r
+               <with\r
+                     variable="selection">\r
+                  <or>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                  </or>\r
+               </with>\r
+            </visibleWhen>\r
+         </command>\r
+         <command\r
+               commandId="org.eclipse.ui.edit.cut"\r
+               label="Cut"\r
+               style="push">\r
+            <visibleWhen>\r
+               <with\r
+                     variable="selection">\r
+                  <or>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                  </or>\r
+               </with>\r
+            </visibleWhen>\r
+         </command>\r
+         <command\r
+               commandId="org.eclipse.ui.edit.rename"\r
+               label="Rename"\r
+               style="push">\r
+            <visibleWhen>\r
+               <with\r
+                     variable="selection">\r
+                  <or>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r
+                           property="org.simantics.graph.resourceType"\r
+                           value="true">\r
+                     </test>\r
+                  </or>\r
+               </with>\r
+            </visibleWhen>\r
+         </command>\r
       </menuContribution>\r
       <menuContribution\r
             locationURI="popup:#ExternalFunctionFileBrowser?after=wbStart">\r
             id="org.simantics.sysdyn.ui.reloadGame"\r
             name="Reload Game">\r
       </command>\r
+      <command\r
+            id="org.simantics.sysdyn.ui.rename2"\r
+            name="Rename2">\r
+      </command>\r
    </extension>\r
    <extension\r
          point="org.eclipse.ui.handlers">\r
             class="org.simantics.sysdyn.ui.handlers.newComponents.NewGameExperimentNodeHanlder"\r
             commandId="org.simantics.sysdyn.ui.newGameExperiment">\r
       </handler>\r
+      <handler\r
+            class="org.simantics.modeling.ui.modelBrowser.handlers.RenameNodeHandler"\r
+            commandId="org.simantics.sysdyn.ui.rename2">\r
+         <enabledWhen>\r
+            <and>\r
+               <with\r
+                     variable="selection">\r
+                  <and>\r
+                     <test\r
+                           args="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r
+                           property="org.simantics.graph.resourceType">\r
+                     </test>\r
+                  </and>\r
+               </with>\r
+            </and>\r
+         </enabledWhen>\r
+      </handler>\r
    </extension>\r
    <extension\r
          point="org.simantics.browsing.ui.common.viewpointContributionBinding">\r