Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cc34dc1e80a5322e373549349608403a0cb6e186 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.tcf.te.ui.notifications" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
      <appinfo>
         <meta.schema plugin="org.eclipse.tcf.te.ui.notifications" id="notifications" name="Notifications"/>
      </appinfo>
      <documentation>
         Provides support for event categories, types and sinks.
      </documentation>
   </annotation>

   <element name="extension">
      <annotation>
         <appinfo>
            <meta.element />
         </appinfo>
      </annotation>
      <complexType>
         <choice minOccurs="1" maxOccurs="unbounded">
            <element ref="category"/>
            <element ref="event"/>
            <element ref="sink"/>
            <element ref="eventMapping"/>
         </choice>
         <attribute name="point" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="name" type="string">
            <annotation>
               <documentation>
                  
               </documentation>
               <appinfo>
                  <meta.attribute translatable="true"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="event">
      <annotation>
         <documentation>
            Event types has an unique identifier, a label and optionally an icon and a category. Whenever a notification is triggered the identifier is used to determine how to present the notification to the user.
         </documentation>
      </annotation>
      <complexType>
         <sequence minOccurs="0" maxOccurs="1">
            <element ref="description"/>
            <element ref="defaultHandler" minOccurs="0" maxOccurs="unbounded"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  a unique event identifier.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="icon" type="string">
            <annotation>
               <documentation>
                  a 16x16 icon.
               </documentation>
               <appinfo>
                  <meta.attribute kind="resource"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="label" type="string" use="required">
            <annotation>
               <documentation>
                  a label describing the event type.
               </documentation>
               <appinfo>
                  <meta.attribute translatable="true"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="categoryId" type="string">
            <annotation>
               <documentation>
                  parent category identifier.
               </documentation>
               <appinfo>
                  <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.notifications.notifications/category/@id"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="category">
      <annotation>
         <documentation>
            Events can (and should) be organised into categories making them easy to locate in the user interface.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  a unique event category identifier.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="icon" type="string">
            <annotation>
               <documentation>
                  a 16x16 icon.
               </documentation>
               <appinfo>
                  <meta.attribute kind="resource"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="label" type="string" use="required">
            <annotation>
               <documentation>
                  a label describing the category.
               </documentation>
               <appinfo>
                  <meta.attribute translatable="true"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="sink">
      <annotation>
         <documentation>
            Notification sinks are used to handle events.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  a unique event sink identifier.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  the event sink implementation.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.notifications.NotificationSink:"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="label" type="string" use="required">
            <annotation>
               <documentation>
                  a label describing the event sink.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="description" type="string">
      <annotation>
         <appinfo>
            <meta.element translatable="true"/>
         </appinfo>
         <documentation>
            A description of the event type.
         </documentation>
      </annotation>
   </element>

   <element name="defaultHandler">
      <annotation>
         <documentation>
            One or more &lt;i&gt;defaultHandler&lt;/i&gt; elements may be added to an event for specifying which sink should handle the event. If none are specified all sinks will be used. Note that this element specifies a default setting that may be changed in user preferences.

A similar effect is achieved by the &lt;i&gt;eventMapping&lt;/i&gt; extension.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="sinkId" type="string" use="required">
            <annotation>
               <documentation>
                  Identifier of the sink that should handle the event.
               </documentation>
               <appinfo>
                  <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.notifications.notifications/sink/@id"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="eventMapping">
      <annotation>
         <documentation>
            Event mappings are used to map one ore more events to a sink. Note that this element specifies a default setting that may be changed in user preferences.

Also see the &lt;i&gt;defaultHandler&lt;/i&gt; element of &lt;i&gt;event&lt;/i&gt; declarations.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="sinkId" type="string" use="required">
            <annotation>
               <documentation>
                  Identifier of the sink that should handle the event.
               </documentation>
               <appinfo>
                  <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.notifications.notifications/sink/@id"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="eventIds" type="string" use="required">
            <annotation>
               <documentation>
                  a comma separated list of event identifiers that will be mapped to the notification sink. The &quot;*&quot; wildcard can be used so that multiple events can be mapped to one sink.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <annotation>
      <appinfo>
         <meta.section type="since"/>
      </appinfo>
      <documentation>
         1.2.0
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="examples"/>
      </appinfo>
      <documentation>
         Following is an example of use:
&lt;pre&gt;
 &lt;extension
       point=&quot;org.eclipse.tcf.te.ui.notifications.notifications&quot;&gt;
    &lt;event
          categoryId=&quot;org.eclipse.mylyn.builds.ui.category.Builds&quot;
          id=&quot;org.eclipse.mylyn.builds.ui.events.BuildServiceChanged&quot;
          label=&quot;Build Service Changed&quot;&gt;
       &lt;description&gt;
          This event is triggered when the status of a build service is changed. For instance a new server is discovered or is no longer available.
       &lt;/description&gt;
       &lt;defaultHandler
          sinkId=&quot;org.eclipse.mylyn.internal.builds.ui.view.NotificationSinkProxy&quot;/&gt;
    &lt;/category&gt;
    &lt;/event&gt;
    &lt;category
          icon=&quot;icons/eview16/build-view.png&quot;
          id=&quot;org.eclipse.mylyn.builds.ui.category.Builds&quot;
          label=&quot;Builds&quot;&gt;
    &lt;/category&gt;
    &lt;sink
          class=&quot;org.eclipse.mylyn.internal.builds.ui.view.NotificationSinkProxy&quot;
          id=&quot;org.eclipse.mylyn.builds.ui.sink.View&quot;
          label=&quot;Builds View&quot;&gt;
    &lt;/sink&gt;
    &lt;eventMapping
          eventIds=&quot;org.eclipse.mylyn.builds.ui.events.*&quot;
          sinkId=&quot;org.eclipse.tcf.te.ui.notifications.sink.Popup&quot;&gt;
    &lt;/eventMapping&gt;
 &lt;/extension&gt;
&lt;/pre&gt;

This example will declare a new event and assign it to the builds view notification sink. The category for the event is also declared in addition to the builds view notification sink. The last configuration element declares a mapping between all build event types and the popup notification sink.
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="apiinfo"/>
      </appinfo>
      <documentation>
         The value of the class attribute in sink must represent a class 
that implements &lt;samp&gt;org.eclipse.tcf.te.runtime.notifications.NotificationSink&lt;/samp&gt;.
      </documentation>
   </annotation>


   <annotation>
      <appinfo>
         <meta.section type="copyright"/>
      </appinfo>
      <documentation>
         Copyright (c) 2010, 2013 Tasktop Technologies and others.
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
      </documentation>
   </annotation>

</schema>

Back to the top