]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/plugin.xml
PipeRun reverse action
[simantics/3d.git] / org.simantics.plant3d / plugin.xml
index fe2eb710365bf831054890187265b1fde30af44c..75426d136edc6700df7e7f21f066e3d5614e9893 100644 (file)
@@ -5,6 +5,7 @@
          point="org.eclipse.ui.editors">
       <editor
             class="org.simantics.plant3d.editor.Plant3DEditor"
+            contributorClass="org.simantics.ui.toolbar.ToolbarContributor:toolbar=org.simantics.plant3d.toolbar;hide=true"
             default="false"
             icon="icons/factory.png"
             id="org.simantics.plant3d.editor"
             allPopups="false"
             locationURI="toolbar:org.eclipse.ui.main.toolbar">
          <toolbar
-               id="org.simantics.plant3d.toolbar">
+               id="org.simantics.plant3d.toolbar"
+               label="Plant 3D Toolbar">
             <separator
                   name="view"
                   visible="true">
             </separator>
-            <command
-                  commandId="org.simantics.g3d.parallelperspective"
-                  icon="platform:/plugin/com.famfamfam.silk/icons/image.png"
-                  label="Parallel perspective"
-                  style="toggle">
-            </command>
-            <command
-                  commandId="org.simantics.g3d.viewdir"
-                  icon="icons/x-axis.png"
-                  label="View X+"
-                  style="push">
-               <parameter
-                     name="org.simantics.g3d.viewDirection"
-                     value="1,0,0">
-               </parameter>
-            </command>
-            <command
-                  commandId="org.simantics.g3d.viewdir"
-                  icon="icons/x-axis.png"
-                  label="View X-"
-                  style="push">
-               <parameter
-                     name="org.simantics.g3d.viewDirection"
-                     value="-1,0,0">
-               </parameter>
-            </command>
-            <command
-                  commandId="org.simantics.g3d.viewdir"
-                  icon="icons/y-axis.png"
-                  label="View Y+"
-                  style="push">
-               <parameter
-                     name="org.simantics.g3d.viewDirection"
-                     value="0,1,0">
-               </parameter>
-            </command>
-            <command
-                  commandId="org.simantics.g3d.viewdir"
-                  icon="icons/y-axis.png"
-                  label="View Y-"
-                  style="push">
-               <parameter
-                     name="org.simantics.g3d.viewDirection"
-                     value="0,-1,0">
-               </parameter>
-            </command>
-            <command
-                  commandId="org.simantics.g3d.viewdir"
-                  icon="icons/z-axis.png"
-                  label="View Z+"
-                  style="push">
-               <parameter
-                     name="org.simantics.g3d.viewDirection"
-                     value="0,0,1">
-               </parameter>
-            </command>
-            <command
-                  commandId="org.simantics.g3d.viewdir"
-                  icon="icons/z-axis.png"
-                  label="View Z-"
-                  style="push">
-               <parameter
-                     name="org.simantics.g3d.viewDirection"
-                     value="0,0,-1">
-               </parameter>
-            </command>
+            <visibleWhen
+                  checkEnabled="false">
+               <with
+                     variable="activeEditorId">
+                  <equals
+                        value="org.simantics.plant3d.editor">
+                  </equals>
+               </with>
+            </visibleWhen>
          </toolbar>
       </menuContribution>
    </extension>
          </implementation>
       </binding>
    </extension>
+   <extension
+         point="org.simantics.ui.toolbarCommand">
+            <command
+            commandId="org.simantics.g3d.parallelperspective"
+            image="platform:/plugin/com.famfamfam.silk/icons/image.png"
+            name="Parallel perspective"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="toggle">
+      </command>
+      <command
+            commandId="org.simantics.g3d.viewdir"
+            image="platform:/plugin/org.simantics.plant3d/icons/x-axis.png"
+            name="View X+"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="push">
+         <parameter
+               name="org.simantics.g3d.viewDirection"
+               value="1,0,0">
+         </parameter>
+      </command>
+      <command
+            commandId="org.simantics.g3d.viewdir"
+            image="platform:/plugin/org.simantics.plant3d/icons/x-axis.png"
+            name="View X-"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="push">
+         <parameter
+               name="org.simantics.g3d.viewDirection"
+               value="-1,0,0">
+         </parameter>
+      </command>
+      <command
+            commandId="org.simantics.g3d.viewdir"
+            image="platform:/plugin/org.simantics.plant3d/icons/y-axis.png"
+            name="View Y+"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="push">
+         <parameter
+               name="org.simantics.g3d.viewDirection"
+               value="0,1,0">
+         </parameter>
+      </command>
+      <command
+            commandId="org.simantics.g3d.viewdir"
+            image="platform:/plugin/org.simantics.plant3d/icons/y-axis.png"
+            name="View Y-"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="push">
+         <parameter
+               name="org.simantics.g3d.viewDirection"
+               value="0,-1,0">
+         </parameter>
+      </command>
+      <command
+            commandId="org.simantics.g3d.viewdir"
+            image="platform:/plugin/org.simantics.plant3d/icons/z-axis.png"
+            name="View Z+"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="push">
+         <parameter
+               name="org.simantics.g3d.viewDirection"
+               value="0,0,1">
+         </parameter>
+      </command>
+      <command
+            commandId="org.simantics.g3d.viewdir"
+            image="platform:/plugin/org.simantics.plant3d/icons/z-axis.png"
+            name="View Z-"
+            toolbarId="org.simantics.plant3d.toolbar"
+            type="push">
+         <parameter
+               name="org.simantics.g3d.viewDirection"
+               value="0,0,-1">
+         </parameter>
+      </command>
+   </extension>
 </plugin>