Commit | Line | Data |
---|---|---|
c068a752 GB |
1 | <?xml version='1.0' encoding='UTF-8'?> |
2 | <!-- Schema file written by PDE --> | |
3 | <schema targetNamespace="org.eclipse.linuxtools.tmf.core" xmlns="http://www.w3.org/2001/XMLSchema"> | |
4 | <annotation> | |
5 | <appinfo> | |
ec40d3ab | 6 | <meta.schema plugin="org.eclipse.linuxtools.tmf.core" id="analysis" name="Trace Analysis Module"/> |
c068a752 GB |
7 | </appinfo> |
8 | <documentation> | |
9 | This extension point is used to contribute new analysis modules to the TMF framework. Analysis modules provide new independent functionalities that can be run on traces. | |
10 | </documentation> | |
11 | </annotation> | |
12 | ||
13 | <element name="extension"> | |
14 | <annotation> | |
15 | <appinfo> | |
16 | <meta.element /> | |
17 | </appinfo> | |
18 | </annotation> | |
19 | <complexType> | |
20 | <sequence minOccurs="0" maxOccurs="unbounded"> | |
21 | <element ref="module"/> | |
b3b03da0 | 22 | <element ref="source"/> |
fe96d03c | 23 | <element ref="output"/> |
55d8eb5e | 24 | <element ref="parameterProvider"/> |
d91f8ef3 | 25 | <element ref="listener"/> |
c068a752 GB |
26 | </sequence> |
27 | <attribute name="point" type="string" use="required"> | |
28 | <annotation> | |
29 | <documentation> | |
30 | a fully qualified identifier of the target extension point | |
31 | </documentation> | |
32 | </annotation> | |
33 | </attribute> | |
34 | <attribute name="id" type="string"> | |
35 | <annotation> | |
36 | <documentation> | |
37 | an optional identifier of the extension instance | |
38 | </documentation> | |
39 | </annotation> | |
40 | </attribute> | |
41 | <attribute name="name" type="string"> | |
42 | <annotation> | |
43 | <documentation> | |
44 | an optional name of the extension instance | |
45 | </documentation> | |
46 | <appinfo> | |
47 | <meta.attribute translatable="true"/> | |
48 | </appinfo> | |
49 | </annotation> | |
50 | </attribute> | |
51 | </complexType> | |
52 | </element> | |
53 | ||
54 | <element name="module"> | |
55 | <complexType> | |
56 | <sequence minOccurs="0" maxOccurs="unbounded"> | |
57 | <element ref="parameter"/> | |
58 | <element ref="tracetype"/> | |
59 | </sequence> | |
60 | <attribute name="id" type="string" use="required"> | |
61 | <annotation> | |
62 | <documentation> | |
63 | The unique ID that identifies this analysis module. | |
64 | </documentation> | |
65 | </annotation> | |
66 | </attribute> | |
67 | <attribute name="name" type="string" use="required"> | |
68 | <annotation> | |
69 | <documentation> | |
70 | The trace analysis module's name as it is displayed to the end user | |
71 | </documentation> | |
72 | </annotation> | |
73 | </attribute> | |
74 | <attribute name="analysis_module" type="string" use="required"> | |
75 | <annotation> | |
76 | <documentation> | |
77 | The fully qualified name of a class that implements the <samp>IAnalysisModule</samp> interface. | |
78 | </documentation> | |
79 | <appinfo> | |
ec40d3ab | 80 | <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule"/> |
c068a752 GB |
81 | </appinfo> |
82 | </annotation> | |
83 | </attribute> | |
84 | <attribute name="icon" type="string"> | |
85 | <annotation> | |
86 | <documentation> | |
87 | The icon associated to this analysis module. | |
88 | </documentation> | |
89 | <appinfo> | |
90 | <meta.attribute kind="resource"/> | |
91 | </appinfo> | |
92 | </annotation> | |
93 | </attribute> | |
94 | <attribute name="automatic" type="boolean"> | |
95 | <annotation> | |
96 | <documentation> | |
97 | Whether to execute this analysis automatically when trace is opened, or wait for the user to ask for it | |
98 | </documentation> | |
99 | </annotation> | |
100 | </attribute> | |
ff7b95a5 GB |
101 | <attribute name="applies_experiment" type="boolean"> |
102 | <annotation> | |
103 | <documentation> | |
d91f8ef3 | 104 | If true, indicate that an instance of this analysis will also be added to an experiment containing one or more trace(s) it applies to. In this case, the analysis will be run on the full experiment and the result is more than just the aggregation of each trace's analysis (default false). |
ff7b95a5 GB |
105 | </documentation> |
106 | </annotation> | |
107 | </attribute> | |
c068a752 GB |
108 | </complexType> |
109 | </element> | |
110 | ||
111 | <element name="parameter"> | |
112 | <annotation> | |
113 | <documentation> | |
114 | Parameter for this module | |
115 | </documentation> | |
116 | </annotation> | |
117 | <complexType> | |
118 | <attribute name="name" type="string" use="required"> | |
119 | <annotation> | |
120 | <documentation> | |
121 | The parameter name | |
122 | </documentation> | |
123 | </annotation> | |
124 | </attribute> | |
125 | <attribute name="default_value" type="string"> | |
126 | <annotation> | |
127 | <documentation> | |
128 | A default value for this parameter | |
129 | </documentation> | |
130 | </annotation> | |
131 | </attribute> | |
132 | </complexType> | |
133 | </element> | |
134 | ||
135 | <element name="tracetype"> | |
136 | <annotation> | |
137 | <documentation> | |
138 | Allow to define the tracetypes this analysis applies to. | |
139 | </documentation> | |
140 | </annotation> | |
141 | <complexType> | |
142 | <attribute name="class" type="string" use="required"> | |
143 | <annotation> | |
144 | <documentation> | |
145 | The base trace class this analysis applies to or not (it also applies to traces extending this class). | |
146 | </documentation> | |
147 | <appinfo> | |
ec40d3ab | 148 | <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.trace.ITmfTrace"/> |
c068a752 GB |
149 | </appinfo> |
150 | </annotation> | |
151 | </attribute> | |
152 | <attribute name="applies" type="boolean"> | |
153 | <annotation> | |
154 | <documentation> | |
155 | Does this tracetype element mean the class applies or not (default true) | |
156 | </documentation> | |
157 | </annotation> | |
158 | </attribute> | |
159 | </complexType> | |
160 | </element> | |
161 | ||
b3b03da0 GB |
162 | <element name="source"> |
163 | <annotation> | |
164 | <documentation> | |
165 | Specifies a class that provides analysis modules. | |
166 | </documentation> | |
167 | </annotation> | |
168 | <complexType> | |
169 | <attribute name="class" type="string" use="required"> | |
170 | <annotation> | |
171 | <documentation> | |
172 | The fully qualified name of a class that implements the <samp>IAnalysisModuleSource</samp> interface. | |
173 | </documentation> | |
174 | <appinfo> | |
ec40d3ab | 175 | <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModuleSource"/> |
b3b03da0 GB |
176 | </appinfo> |
177 | </annotation> | |
178 | </attribute> | |
179 | </complexType> | |
180 | </element> | |
181 | ||
fe96d03c GB |
182 | <element name="output"> |
183 | <annotation> | |
184 | <documentation> | |
185 | Associates an output with an analysis module or a class of analysis modules. | |
186 | </documentation> | |
187 | </annotation> | |
188 | <complexType> | |
189 | <choice> | |
190 | <element ref="analysisId"/> | |
191 | <element ref="analysisModuleClass"/> | |
192 | </choice> | |
193 | <attribute name="class" type="string" use="required"> | |
194 | <annotation> | |
195 | <documentation> | |
196 | The class of this output. | |
197 | </documentation> | |
198 | <appinfo> | |
ec40d3ab | 199 | <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisOutput"/> |
fe96d03c GB |
200 | </appinfo> |
201 | </annotation> | |
202 | </attribute> | |
203 | <attribute name="id" type="string"> | |
204 | <annotation> | |
205 | <documentation> | |
206 | An ID for this output. For example, for a view, it would be the view ID. | |
207 | </documentation> | |
208 | </annotation> | |
209 | </attribute> | |
210 | </complexType> | |
211 | </element> | |
212 | ||
55d8eb5e FG |
213 | <element name="parameterProvider"> |
214 | <annotation> | |
215 | <documentation> | |
216 | Associates a parameter provider class with an analysis ID. | |
217 | </documentation> | |
218 | </annotation> | |
219 | <complexType> | |
220 | <sequence> | |
221 | <element ref="analysisId"/> | |
222 | </sequence> | |
223 | <attribute name="class" type="string" use="required"> | |
224 | <annotation> | |
225 | <documentation> | |
226 | The class that contains this analysis parameter provider. | |
227 | </documentation> | |
228 | <appinfo> | |
229 | <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.analysis.IAnalysisParameterProvider"/> | |
230 | </appinfo> | |
231 | </annotation> | |
232 | </attribute> | |
233 | </complexType> | |
234 | </element> | |
235 | ||
fe96d03c GB |
236 | <element name="analysisId"> |
237 | <annotation> | |
238 | <documentation> | |
239 | The output will be associated with a single analysis identified by the ID attribute. | |
240 | </documentation> | |
241 | </annotation> | |
242 | <complexType> | |
243 | <attribute name="id" type="string" use="required"> | |
244 | <annotation> | |
245 | <documentation> | |
246 | The full ID of the analysis. | |
247 | </documentation> | |
6866ca4c GB |
248 | <appinfo> |
249 | <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.analysis/module/@id"/> | |
250 | </appinfo> | |
fe96d03c GB |
251 | </annotation> |
252 | </attribute> | |
253 | </complexType> | |
254 | </element> | |
255 | ||
256 | <element name="analysisModuleClass"> | |
257 | <annotation> | |
258 | <documentation> | |
6866ca4c | 259 | The output will be associated with all modules extending or implementing the 'class' attribute. |
fe96d03c GB |
260 | </documentation> |
261 | </annotation> | |
262 | <complexType> | |
263 | <attribute name="class" type="string" use="required"> | |
264 | <annotation> | |
265 | <documentation> | |
266 | The module class or interface the modules need to extend or implement for this output to be applicable. | |
267 | </documentation> | |
268 | <appinfo> | |
ec40d3ab | 269 | <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule"/> |
fe96d03c GB |
270 | </appinfo> |
271 | </annotation> | |
272 | </attribute> | |
273 | </complexType> | |
274 | </element> | |
275 | ||
d91f8ef3 GB |
276 | <element name="listener"> |
277 | <complexType> | |
278 | <attribute name="class" type="string" use="required"> | |
279 | <annotation> | |
280 | <documentation> | |
281 | Specify a class that will listen to new modules created. This listener will listen to the creation of any module. | |
282 | </documentation> | |
283 | <appinfo> | |
284 | <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.ITmfNewAnalysisModuleListener"/> | |
285 | </appinfo> | |
286 | </annotation> | |
287 | </attribute> | |
288 | </complexType> | |
289 | </element> | |
290 | ||
c068a752 GB |
291 | <annotation> |
292 | <appinfo> | |
293 | <meta.section type="since"/> | |
294 | </appinfo> | |
295 | <documentation> | |
296 | 3.0 | |
297 | </documentation> | |
298 | </annotation> | |
299 | ||
300 | <annotation> | |
301 | <appinfo> | |
302 | <meta.section type="examples"/> | |
303 | </appinfo> | |
304 | <documentation> | |
305 | <p> | |
306 | For an example implementation of an analysis module see: | |
307 | <pre> | |
308 | plug-in: org.eclipse.linuxtools.tmf.core.tests | |
309 | package: org.eclipse.linuxtools.tmf.core.tests.stubs.analysis | |
310 | class: TestCtfAnalysis | |
311 | </pre> | |
312 | </p> | |
313 | ||
314 | <p> | |
315 | The following is an example of the extension point: | |
316 | <pre> | |
317 | <extension | |
318 | point="org.eclipse.linuxtools.tmf.core.analysis"> | |
319 | <module | |
320 | id="org.eclipse.linuxtools.tmf.core.tests.analysis.testctf" | |
321 | name="Test analysis ctf" | |
322 | analysis_module="org.eclipse.linuxtools.tmf.tests.stubs.analysis.TestCtfAnalysis" | |
323 | automatic="true"> | |
324 | </module> | |
325 | </extension> | |
326 | </pre> | |
327 | </p> | |
328 | </documentation> | |
329 | </annotation> | |
330 | ||
331 | <annotation> | |
332 | <appinfo> | |
333 | <meta.section type="apiinfo"/> | |
334 | </appinfo> | |
335 | <documentation> | |
336 | <p> | |
337 | For this extension point, a class implementing IAnalysisModule must be defined (org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule). Most analysis can just extend the org.eclipse.linuxtools.tmf.core.analysis.TmfAbstractAnalysisModule class, since it already contains everything to manage the trace's, the analysis' execution, cancellation, completion, the help texts, etc. | |
338 | </p> | |
339 | <p> | |
340 | The key method to implement if extending TmfAbstractAnalysisModule is executeAnalysis(final IProgressMonitor monitor). It contains the code of the analysis itself and is executed inside an Eclipse job. | |
341 | </p> | |
342 | </documentation> | |
343 | </annotation> | |
344 | ||
345 | ||
346 | <annotation> | |
347 | <appinfo> | |
348 | <meta.section type="copyright"/> | |
349 | </appinfo> | |
350 | <documentation> | |
351 | Copyright (c) 2013 École Polytechnique de Montréal | |
352 | ||
353 | 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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> | |
354 | </documentation> | |
355 | </annotation> | |
356 | ||
357 | </schema> |