-<?xml version="1.0" encoding="UTF-8"?>\r
-<?eclipse version="3.4"?>\r<!--\r
- Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
- Industry THTH ry.\r
- All rights reserved. This program and the accompanying materials\r
- are made available under the terms of the Eclipse Public License v1.0\r
- which accompanies this distribution, and is available at\r
- http://www.eclipse.org/legal/epl-v10.html\r
- \r
- Contributors:\r
- VTT Technical Research Centre of Finland - initial API and implementation\r
- -->\r
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>\r<!--
+ Copyright (c) 2012, 2013 Association for Decentralized Information Management in
+ Industry THTH ry.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ VTT Technical Research Centre of Finland - initial API and implementation
+ -->
-<plugin>\r
- <extension-point id="toolbarCommand" name="toolbarCommand" schema="schema/toolbarCommand.exsd"/>\r
- <extension\r
- point="org.eclipse.ui.views">\r
- <view\r
- allowMultiple="false"\r
- category="org.simantics.debug.ui"\r
- class="org.simantics.g3d.ui.SceneGraphDebugger"\r
- icon="platform:/plugin/com.famfamfam.silk/icons/car.png"\r
- id="org.simantics.g3d.debug"\r
- name="Scene-graph Debugger"\r
- restorable="true">\r
- </view>\r
- </extension>\r
- <extension\r
- point="org.eclipse.ui.preferencePages">\r
- <page\r
- class="org.simantics.g3d.preferences.G3DPreferencePage"\r
- id="org.simantics.g3d.preferences.G3DPreferencePage"\r
- name="3D Modelling Preferences">\r
- </page>\r
- </extension>\r
- <extension\r
- point="org.eclipse.core.runtime.preferences">\r
- <initializer\r
- class="org.simantics.g3d.preferences.PreferenceInitializer">\r
- </initializer>\r
- </extension>\r
- <extension\r
- point="org.eclipse.ui.commands">\r
- <category\r
- id="org.simantics.g3d.category"\r
- name="3D Modelling Commands">\r
- </category>\r
- <command\r
- categoryId="org.simantics.g3d.category"\r
- id="org.simantics.g3d.parallelperspective"\r
- name="Parallel perspective">\r
- <state\r
- id="org.eclipse.ui.commands.toggleState">\r
- <class\r
- class="org.eclipse.ui.handlers.RegistryToggleState">\r
- <parameter\r
- name="persisted"\r
- value="false">\r
- </parameter>\r
- <parameter\r
- name="default"\r
- value="false">\r
- </parameter>\r
- </class>\r
- </state>\r
- </command>\r
- <command\r
- categoryId="org.simantics.g3d.category"\r
- id="org.simantics.g3d.viewdir"\r
- name="View Dir">\r
- <commandParameter\r
- id="org.simantics.g3d.viewDirection"\r
- name="direction"\r
- optional="true">\r
- </commandParameter>\r
- </command>\r
- </extension>\r
-\r
-</plugin>\r
+<plugin>
+ <extension-point id="toolbarCommand" name="toolbarCommand" schema="schema/toolbarCommand.exsd"/>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ allowMultiple="false"
+ category="org.simantics.debug.ui"
+ class="org.simantics.g3d.ui.SceneGraphDebugger"
+ icon="platform:/plugin/com.famfamfam.silk/icons/car.png"
+ id="org.simantics.g3d.debug"
+ name="Scene-graph Debugger"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.simantics.g3d.preferences.G3DPreferencePage"
+ id="org.simantics.g3d.preferences.G3DPreferencePage"
+ name="3D Modelling Preferences">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.simantics.g3d.preferences.PreferenceInitializer">
+ </initializer>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.simantics.g3d.category"
+ name="3D Modelling Commands">
+ </category>
+ <command
+ categoryId="org.simantics.g3d.category"
+ id="org.simantics.g3d.parallelperspective"
+ name="Parallel perspective">
+ <state
+ id="org.eclipse.ui.commands.toggleState">
+ <class
+ class="org.eclipse.ui.handlers.RegistryToggleState">
+ <parameter
+ name="persisted"
+ value="false">
+ </parameter>
+ <parameter
+ name="default"
+ value="false">
+ </parameter>
+ </class>
+ </state>
+ </command>
+ <command
+ categoryId="org.simantics.g3d.category"
+ id="org.simantics.g3d.viewdir"
+ name="View Direction">
+ <commandParameter
+ id="org.simantics.g3d.viewDirection"
+ name="direction"
+ optional="true">
+ </commandParameter>
+ </command>
+ </extension>
+
+</plugin>
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>