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