]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.ui/schema/toolbarCommand.exsd
Sync git svn branch with SVN repository r33198.
[simantics/platform.git] / bundles / org.simantics.ui / schema / toolbarCommand.exsd
1 <?xml version='1.0' encoding='UTF-8'?>\r
2 <!-- Schema file written by PDE -->\r
3 <schema targetNamespace="org.simantics.ui" xmlns="http://www.w3.org/2001/XMLSchema">\r
4 <annotation>\r
5       <appInfo>\r
6          <meta.schema plugin="org.simantics.ui" id="toolbarCommand" name="toolbarCommand"/>\r
7       </appInfo>\r
8       <documentation>\r
9          Binds commands to editor tool bar, similarly to org.eclipse.ui.menus that binds commands to menus (and toolbars).\r
10 \r
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.\r
12 \r
13 The editor must use org.simantics.ui.toolbar.ToolbarContributor as  a contributorClass, and &quot;toolbar&quot; paramater pointing to used toolbar ID.\r
14 Optional &quot;hide=true&quot; parameter allows hiding (hide by default)the toolbar when the editor is closed.\r
15 \r
16 Example:\r
17 org.simantics.ui.toolbar.ToolbarContributor:toolbar=org.simantics.kcleco.ui.diagramToolbar;hide=true\r
18 \r
19 Toggle buttons must use command state &quot;org.eclipse.ui.commands.toggleState&quot;.\r
20 Radio and combo buttons must use  state &quot;org.eclipse.ui.commands.radioState&quot;.\r
21 It&apos;s recommended to set state persistence off for the commands. \r
22 \r
23 \r
24 TODO: investigate, if the mechanism could be used with menus aswell.\r
25       </documentation>\r
26    </annotation>\r
27 \r
28    <element name="extension">\r
29       <annotation>\r
30          <appInfo>\r
31             <meta.element />\r
32          </appInfo>\r
33       </annotation>\r
34       <complexType>\r
35          <sequence>\r
36             <element ref="command" minOccurs="0" maxOccurs="unbounded"/>\r
37          </sequence>\r
38          <attribute name="point" type="string" use="required">\r
39             <annotation>\r
40                <documentation>\r
41                   \r
42                </documentation>\r
43             </annotation>\r
44          </attribute>\r
45          <attribute name="id" type="string">\r
46             <annotation>\r
47                <documentation>\r
48                   \r
49                </documentation>\r
50             </annotation>\r
51          </attribute>\r
52          <attribute name="name" type="string">\r
53             <annotation>\r
54                <documentation>\r
55                   \r
56                </documentation>\r
57                <appInfo>\r
58                   <meta.attribute translatable="true"/>\r
59                </appInfo>\r
60             </annotation>\r
61          </attribute>\r
62       </complexType>\r
63    </element>\r
64 \r
65    <element name="command">\r
66       <complexType>\r
67          <choice minOccurs="0" maxOccurs="unbounded">\r
68             <element ref="parameter"/>\r
69          </choice>\r
70          <attribute name="commandId" type="string" use="required">\r
71             <annotation>\r
72                <documentation>\r
73                   \r
74                </documentation>\r
75             </annotation>\r
76          </attribute>\r
77          <attribute name="toolbarId" type="string" use="required">\r
78             <annotation>\r
79                <documentation>\r
80                   \r
81                </documentation>\r
82             </annotation>\r
83          </attribute>\r
84          <attribute name="name" type="string" use="required">\r
85             <annotation>\r
86                <documentation>\r
87                   \r
88                </documentation>\r
89             </annotation>\r
90          </attribute>\r
91          <attribute name="type" use="required">\r
92             <annotation>\r
93                <documentation>\r
94                   \r
95                </documentation>\r
96             </annotation>\r
97             <simpleType>\r
98                <restriction base="string">\r
99                   <enumeration value="push">\r
100                   </enumeration>\r
101                   <enumeration value="toggle">\r
102                   </enumeration>\r
103                   <enumeration value="radio">\r
104                   </enumeration>\r
105                   <enumeration value="combo">\r
106                   </enumeration>\r
107                </restriction>\r
108             </simpleType>\r
109          </attribute>\r
110          <attribute name="value" type="string">\r
111             <annotation>\r
112                <documentation>\r
113                   Used with radio buttons.\r
114                </documentation>\r
115             </annotation>\r
116          </attribute>\r
117          <attribute name="image" type="string">\r
118             <annotation>\r
119                <documentation>\r
120                   \r
121                </documentation>\r
122                <appInfo>\r
123                   <meta.attribute kind="resource"/>\r
124                </appInfo>\r
125             </annotation>\r
126          </attribute>\r
127       </complexType>\r
128    </element>\r
129 \r
130    <element name="parameter">\r
131       <complexType>\r
132          <attribute name="name" type="string" use="required">\r
133             <annotation>\r
134                <documentation>\r
135                   \r
136                </documentation>\r
137             </annotation>\r
138          </attribute>\r
139          <attribute name="value" type="string" use="required">\r
140             <annotation>\r
141                <documentation>\r
142                   \r
143                </documentation>\r
144             </annotation>\r
145          </attribute>\r
146       </complexType>\r
147    </element>\r
148 \r
149    <annotation>\r
150       <appInfo>\r
151          <meta.section type="since"/>\r
152       </appInfo>\r
153       <documentation>\r
154          [Enter the first release in which this extension point appears.]\r
155       </documentation>\r
156    </annotation>\r
157 \r
158    <annotation>\r
159       <appInfo>\r
160          <meta.section type="examples"/>\r
161       </appInfo>\r
162       <documentation>\r
163          [Enter extension point usage example here.]\r
164       </documentation>\r
165    </annotation>\r
166 \r
167    <annotation>\r
168       <appInfo>\r
169          <meta.section type="apiinfo"/>\r
170       </appInfo>\r
171       <documentation>\r
172          [Enter API information here.]\r
173       </documentation>\r
174    </annotation>\r
175 \r
176    <annotation>\r
177       <appInfo>\r
178          <meta.section type="implementation"/>\r
179       </appInfo>\r
180       <documentation>\r
181          [Enter information about supplied implementation of this extension point.]\r
182       </documentation>\r
183    </annotation>\r
184 \r
185 \r
186 </schema>\r