]> 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 e256683aa30ceb134c09d297c483ab54a1ef52b9..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"
             type_uris="http://www.simantics.org/Plant3D-0.1/Plant">
       </adapter>
    </extension>
-   <extension
-         point="org.eclipse.ui.perspectives">
-      <perspective
-            class="org.simantics.plant3d.project.P3DPerspectiveFactory"
-            icon="icons/factory.png"
-            id="org.simantics.plant3d.perspective"
-            name="Plant3D">
-      </perspective>
-   </extension>
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="org.simantics.plant3d.perspective">
-         <view
-               id="org.simantics.plant3d.ModelBrowser"
-               minimized="false"
-               ratio="0.3"
-               relationship="left"
-               relative="org.eclipse.ui.editorss">
-         </view>
-         <view
-               id="org.simantics.browsing.ui.graph.propertyView"
-               minimized="false"
-               ratio="0.7"
-               relationship="bottom"
-               relative="org.eclipse.ui.editorss"
-               visible="true">
-         </view>
-         <view
-               id="org.simantics.browsing.ui.graph.propertyView:*"
-               minimized="false"
-               relationship="stack"
-               relative="org.simantics.browsing.ui.graph.propertyView"
-               visible="false">
-         </view>
-         <view
-               id="org.simantics.browsing.ui.graph.propertyViewPinned:*"
-               minimized="false"
-               relationship="stack"
-               relative="org.simantics.browsing.ui.graph.propertyView"
-               visible="false">
-         </view>
-         <view
-               id="org.eclipse.ui.views.ContentOutline"
-               minimized="false"
-               ratio="0.8"
-               relationship="right"
-               relative="org.eclipse.ui.editorss"
-               visible="true">
-         </view>
-      </perspectiveExtension>
-   </extension>
-   <extension
-         point="org.eclipse.ui.views">
-      <view
-            class="org.simantics.plant3d.browser.P3DBrowser:browseContext=http://www.simantics.org/CSG-0.1/CSGBrowseContext;browseContext=http://www.simantics.org/Plant3D-0.1/P3DBrowseContext"
-            icon="icons/factory.png"
-            id="org.simantics.plant3d.ModelBrowser"
-            name="Model Browser"
-            restorable="true">
-      </view>
-   </extension>
    <extension
          point="org.eclipse.ui.menus">
-      <menuContribution
-            allPopups="false"
-            locationURI="menu:#FileNewMenu">
-         <command
-               commandId="org.simantics.plant3d.newPlant"
-               label="New Plant"
-               style="push">
-         </command>
-      </menuContribution>
       <menuContribution
             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>
             name="Plant3D commands">
       </category>
       <command
-            category="org.simantics.plant3d.category"
+            categoryId="org.simantics.plant3d.category"
             id="org.simantics.plant3d.newPlant"
             name="New Plant">
       </command>
+      <command
+            categoryId="org.simantics.plant3d.category"
+            id="org.simantics.plant3d.newCSGModel"
+            name="New CSG Model">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
             </with>
          </activeWhen>
       </handler>
-   </extension>
-   <extension
-         point="org.simantics.project.feature">
-      <feature
-            class="org.simantics.plant3d.project.P3DProjectFeature"
-            id="org.simantics.plant3d.project.feature"
-            label="Plant3D Project"
-            published="true">
-         <installGroup
-               id="org.simantics.plant3d.installGroup"
-               version="[1.0.0,2.0.0)">
-         </installGroup>
-      </feature>
+      <handler
+            class="org.simantics.g3d.csg.handler.NewCSGModelHandler"
+            commandId="org.simantics.plant3d.newCSGModel">
+      </handler>
    </extension>
    <extension
          point="org.eclipse.ui.contexts">
             name="Plant3D Context">
       </context>
    </extension>
-   <extension
-         point="org.simantics.ui.perspectiveContextBinding">
-      <binding
-            contextIds="org.simantics.plant3d.context"
-            perspectiveId="org.simantics.plant3d.perspective">
-      </binding>
-   </extension>
    <extension
          point="org.simantics.browsing.ui.common.selectionProcessorBinding">
       <binding
          </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>