]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.ui/schema/toolbarCommand.exsd
Migrated source code from Simantics SVN
[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 \r
15 Example:\r
16 org.simantics.ui.toolbar.ToolbarContributor:toolbar=org.simantics.kcleco.ui.diagramToolbar\r
17 \r
18 Toggle buttons must use command state &quot;org.eclipse.ui.commands.toggleState&quot;.\r
19 Radio and combo buttons must use  state &quot;org.eclipse.ui.commands.radioState&quot;.\r
20 It&apos;s recommended to set state persistence off for the commands. \r
21 \r
22 \r
23 TODO: investigate, if the mechanism could be used with menus aswell.\r
24       </documentation>\r
25    </annotation>\r
26 \r
27    <element name="extension">\r
28       <annotation>\r
29          <appInfo>\r
30             <meta.element />\r
31          </appInfo>\r
32       </annotation>\r
33       <complexType>\r
34          <sequence>\r
35             <element ref="command" minOccurs="0" maxOccurs="unbounded"/>\r
36          </sequence>\r
37          <attribute name="point" type="string" use="required">\r
38             <annotation>\r
39                <documentation>\r
40                   \r
41                </documentation>\r
42             </annotation>\r
43          </attribute>\r
44          <attribute name="id" type="string">\r
45             <annotation>\r
46                <documentation>\r
47                   \r
48                </documentation>\r
49             </annotation>\r
50          </attribute>\r
51          <attribute name="name" type="string">\r
52             <annotation>\r
53                <documentation>\r
54                   \r
55                </documentation>\r
56                <appInfo>\r
57                   <meta.attribute translatable="true"/>\r
58                </appInfo>\r
59             </annotation>\r
60          </attribute>\r
61       </complexType>\r
62    </element>\r
63 \r
64    <element name="command">\r
65       <complexType>\r
66          <attribute name="commandId" type="string" use="required">\r
67             <annotation>\r
68                <documentation>\r
69                   \r
70                </documentation>\r
71             </annotation>\r
72          </attribute>\r
73          <attribute name="toolbarId" type="string" use="required">\r
74             <annotation>\r
75                <documentation>\r
76                   \r
77                </documentation>\r
78             </annotation>\r
79          </attribute>\r
80          <attribute name="name" type="string" use="required">\r
81             <annotation>\r
82                <documentation>\r
83                   \r
84                </documentation>\r
85             </annotation>\r
86          </attribute>\r
87          <attribute name="type" use="required">\r
88             <annotation>\r
89                <documentation>\r
90                   \r
91                </documentation>\r
92             </annotation>\r
93             <simpleType>\r
94                <restriction base="string">\r
95                   <enumeration value="push">\r
96                   </enumeration>\r
97                   <enumeration value="toggle">\r
98                   </enumeration>\r
99                   <enumeration value="radio">\r
100                   </enumeration>\r
101                   <enumeration value="combo">\r
102                   </enumeration>\r
103                </restriction>\r
104             </simpleType>\r
105          </attribute>\r
106          <attribute name="value" type="string">\r
107             <annotation>\r
108                <documentation>\r
109                   Used with radio buttons.\r
110                </documentation>\r
111             </annotation>\r
112          </attribute>\r
113          <attribute name="image" type="string">\r
114             <annotation>\r
115                <documentation>\r
116                   \r
117                </documentation>\r
118                <appInfo>\r
119                   <meta.attribute kind="resource"/>\r
120                </appInfo>\r
121             </annotation>\r
122          </attribute>\r
123       </complexType>\r
124    </element>\r
125 \r
126    <annotation>\r
127       <appInfo>\r
128          <meta.section type="since"/>\r
129       </appInfo>\r
130       <documentation>\r
131          [Enter the first release in which this extension point appears.]\r
132       </documentation>\r
133    </annotation>\r
134 \r
135    <annotation>\r
136       <appInfo>\r
137          <meta.section type="examples"/>\r
138       </appInfo>\r
139       <documentation>\r
140          [Enter extension point usage example here.]\r
141       </documentation>\r
142    </annotation>\r
143 \r
144    <annotation>\r
145       <appInfo>\r
146          <meta.section type="apiinfo"/>\r
147       </appInfo>\r
148       <documentation>\r
149          [Enter API information here.]\r
150       </documentation>\r
151    </annotation>\r
152 \r
153    <annotation>\r
154       <appInfo>\r
155          <meta.section type="implementation"/>\r
156       </appInfo>\r
157       <documentation>\r
158          [Enter information about supplied implementation of this extension point.]\r
159       </documentation>\r
160    </annotation>\r
161 \r
162 \r
163 </schema>\r