1 <?xml version='1.0' encoding='UTF-8'?>
2 <!-- Schema file written by PDE -->
3 <schema targetNamespace="org.simantics.ui" xmlns="http://www.w3.org/2001/XMLSchema">
6 <meta.schema plugin="org.simantics.ui" id="toolbarCommand" name="toolbarCommand"/>
9 Binds commands to editor tool bar, similarly to org.eclipse.ui.menus that binds commands to menus (and toolbars).
11 The difference is, that this system tracks state of the commands spearately for each editor, and automatically updates toggle- and radio buttons, when focus changes.
13 The editor must use org.simantics.ui.toolbar.ToolbarContributor as a contributorClass, and "toolbar" paramater pointing to used toolbar ID.
14 Optional "hide=true" parameter allows hiding (hide by default)the toolbar when the editor is closed.
17 org.simantics.ui.toolbar.ToolbarContributor:toolbar=org.simantics.kcleco.ui.diagramToolbar;hide=true
19 Toggle buttons must use command state "org.eclipse.ui.commands.toggleState".
20 Radio and combo buttons must use state "org.eclipse.ui.commands.radioState".
21 It's recommended to set state persistence off for the commands.
24 TODO: investigate, if the mechanism could be used with menus aswell.
28 <element name="extension">
36 <element ref="command" minOccurs="0" maxOccurs="unbounded"/>
38 <attribute name="point" type="string" use="required">
45 <attribute name="id" type="string">
52 <attribute name="name" type="string">
58 <meta.attribute translatable="true"/>
65 <element name="command">
67 <choice minOccurs="0" maxOccurs="unbounded">
68 <element ref="parameter"/>
70 <attribute name="commandId" type="string" use="required">
77 <attribute name="toolbarId" type="string" use="required">
84 <attribute name="name" type="string" use="required">
91 <attribute name="type" use="required">
98 <restriction base="string">
99 <enumeration value="push">
101 <enumeration value="toggle">
103 <enumeration value="radio">
105 <enumeration value="combo">
110 <attribute name="value" type="string">
113 Used with radio buttons.
117 <attribute name="image" type="string">
123 <meta.attribute kind="resource"/>
130 <element name="parameter">
132 <attribute name="name" type="string" use="required">
139 <attribute name="value" type="string" use="required">
151 <meta.section type="since"/>
154 [Enter the first release in which this extension point appears.]
160 <meta.section type="examples"/>
163 [Enter extension point usage example here.]
169 <meta.section type="apiinfo"/>
172 [Enter API information here.]
178 <meta.section type="implementation"/>
181 [Enter information about supplied implementation of this extension point.]