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> | |
6 | <meta.schema plugin="org.eclipse.linuxtools.tmf.core" id="org.eclipse.linuxtools.tmf.core.analysis" name="Trace Analysis Module"/> | |
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"/> |
c068a752 GB |
24 | </sequence> |
25 | <attribute name="point" type="string" use="required"> | |
26 | <annotation> | |
27 | <documentation> | |
28 | a fully qualified identifier of the target extension point | |
29 | </documentation> | |
30 | </annotation> | |
31 | </attribute> | |
32 | <attribute name="id" type="string"> | |
33 | <annotation> | |
34 | <documentation> | |
35 | an optional identifier of the extension instance | |
36 | </documentation> | |
37 | </annotation> | |
38 | </attribute> | |
39 | <attribute name="name" type="string"> | |
40 | <annotation> | |
41 | <documentation> | |
42 | an optional name of the extension instance | |
43 | </documentation> | |
44 | <appinfo> | |
45 | <meta.attribute translatable="true"/> | |
46 | </appinfo> | |
47 | </annotation> | |
48 | </attribute> | |
49 | </complexType> | |
50 | </element> | |
51 | ||
52 | <element name="module"> | |
53 | <complexType> | |
54 | <sequence minOccurs="0" maxOccurs="unbounded"> | |
55 | <element ref="parameter"/> | |
56 | <element ref="tracetype"/> | |
57 | </sequence> | |
58 | <attribute name="id" type="string" use="required"> | |
59 | <annotation> | |
60 | <documentation> | |
61 | The unique ID that identifies this analysis module. | |
62 | </documentation> | |
63 | </annotation> | |
64 | </attribute> | |
65 | <attribute name="name" type="string" use="required"> | |
66 | <annotation> | |
67 | <documentation> | |
68 | The trace analysis module's name as it is displayed to the end user | |
69 | </documentation> | |
70 | </annotation> | |
71 | </attribute> | |
72 | <attribute name="analysis_module" type="string" use="required"> | |
73 | <annotation> | |
74 | <documentation> | |
75 | The fully qualified name of a class that implements the <samp>IAnalysisModule</samp> interface. | |
76 | </documentation> | |
77 | <appinfo> | |
78 | <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule"/> | |
79 | </appinfo> | |
80 | </annotation> | |
81 | </attribute> | |
82 | <attribute name="icon" type="string"> | |
83 | <annotation> | |
84 | <documentation> | |
85 | The icon associated to this analysis module. | |
86 | </documentation> | |
87 | <appinfo> | |
88 | <meta.attribute kind="resource"/> | |
89 | </appinfo> | |
90 | </annotation> | |
91 | </attribute> | |
92 | <attribute name="automatic" type="boolean"> | |
93 | <annotation> | |
94 | <documentation> | |
95 | Whether to execute this analysis automatically when trace is opened, or wait for the user to ask for it | |
96 | </documentation> | |
97 | </annotation> | |
98 | </attribute> | |
99 | </complexType> | |
100 | </element> | |
101 | ||
102 | <element name="parameter"> | |
103 | <annotation> | |
104 | <documentation> | |
105 | Parameter for this module | |
106 | </documentation> | |
107 | </annotation> | |
108 | <complexType> | |
109 | <attribute name="name" type="string" use="required"> | |
110 | <annotation> | |
111 | <documentation> | |
112 | The parameter name | |
113 | </documentation> | |
114 | </annotation> | |
115 | </attribute> | |
116 | <attribute name="default_value" type="string"> | |
117 | <annotation> | |
118 | <documentation> | |
119 | A default value for this parameter | |
120 | </documentation> | |
121 | </annotation> | |
122 | </attribute> | |
123 | </complexType> | |
124 | </element> | |
125 | ||
126 | <element name="tracetype"> | |
127 | <annotation> | |
128 | <documentation> | |
129 | Allow to define the tracetypes this analysis applies to. | |
130 | </documentation> | |
131 | </annotation> | |
132 | <complexType> | |
133 | <attribute name="class" type="string" use="required"> | |
134 | <annotation> | |
135 | <documentation> | |
136 | The base trace class this analysis applies to or not (it also applies to traces extending this class). | |
137 | </documentation> | |
138 | <appinfo> | |
139 | <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.trace.ITmfTrace"/> | |
140 | </appinfo> | |
141 | </annotation> | |
142 | </attribute> | |
143 | <attribute name="applies" type="boolean"> | |
144 | <annotation> | |
145 | <documentation> | |
146 | Does this tracetype element mean the class applies or not (default true) | |
147 | </documentation> | |
148 | </annotation> | |
149 | </attribute> | |
150 | </complexType> | |
151 | </element> | |
152 | ||
b3b03da0 GB |
153 | <element name="source"> |
154 | <annotation> | |
155 | <documentation> | |
156 | Specifies a class that provides analysis modules. | |
157 | </documentation> | |
158 | </annotation> | |
159 | <complexType> | |
160 | <attribute name="class" type="string" use="required"> | |
161 | <annotation> | |
162 | <documentation> | |
163 | The fully qualified name of a class that implements the <samp>IAnalysisModuleSource</samp> interface. | |
164 | </documentation> | |
165 | <appinfo> | |
166 | <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModuleSource"/> | |
167 | </appinfo> | |
168 | </annotation> | |
169 | </attribute> | |
170 | </complexType> | |
171 | </element> | |
172 | ||
fe96d03c GB |
173 | <element name="output"> |
174 | <annotation> | |
175 | <documentation> | |
176 | Associates an output with an analysis module or a class of analysis modules. | |
177 | </documentation> | |
178 | </annotation> | |
179 | <complexType> | |
180 | <choice> | |
181 | <element ref="analysisId"/> | |
182 | <element ref="analysisModuleClass"/> | |
183 | </choice> | |
184 | <attribute name="class" type="string" use="required"> | |
185 | <annotation> | |
186 | <documentation> | |
187 | The class of this output. | |
188 | </documentation> | |
189 | <appinfo> | |
190 | <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.analysis.IAnalysisOutput"/> | |
191 | </appinfo> | |
192 | </annotation> | |
193 | </attribute> | |
194 | <attribute name="id" type="string"> | |
195 | <annotation> | |
196 | <documentation> | |
197 | An ID for this output. For example, for a view, it would be the view ID. | |
198 | </documentation> | |
199 | </annotation> | |
200 | </attribute> | |
201 | </complexType> | |
202 | </element> | |
203 | ||
204 | <element name="analysisId"> | |
205 | <annotation> | |
206 | <documentation> | |
207 | The output will be associated with a single analysis identified by the ID attribute. | |
208 | </documentation> | |
209 | </annotation> | |
210 | <complexType> | |
211 | <attribute name="id" type="string" use="required"> | |
212 | <annotation> | |
213 | <documentation> | |
214 | The full ID of the analysis. | |
215 | </documentation> | |
6866ca4c GB |
216 | <appinfo> |
217 | <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.analysis/module/@id"/> | |
218 | </appinfo> | |
fe96d03c GB |
219 | </annotation> |
220 | </attribute> | |
221 | </complexType> | |
222 | </element> | |
223 | ||
224 | <element name="analysisModuleClass"> | |
225 | <annotation> | |
226 | <documentation> | |
6866ca4c | 227 | The output will be associated with all modules extending or implementing the 'class' attribute. |
fe96d03c GB |
228 | </documentation> |
229 | </annotation> | |
230 | <complexType> | |
231 | <attribute name="class" type="string" use="required"> | |
232 | <annotation> | |
233 | <documentation> | |
234 | The module class or interface the modules need to extend or implement for this output to be applicable. | |
235 | </documentation> | |
236 | <appinfo> | |
237 | <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule"/> | |
238 | </appinfo> | |
239 | </annotation> | |
240 | </attribute> | |
241 | </complexType> | |
242 | </element> | |
243 | ||
c068a752 GB |
244 | <annotation> |
245 | <appinfo> | |
246 | <meta.section type="since"/> | |
247 | </appinfo> | |
248 | <documentation> | |
249 | 3.0 | |
250 | </documentation> | |
251 | </annotation> | |
252 | ||
253 | <annotation> | |
254 | <appinfo> | |
255 | <meta.section type="examples"/> | |
256 | </appinfo> | |
257 | <documentation> | |
258 | <p> | |
259 | For an example implementation of an analysis module see: | |
260 | <pre> | |
261 | plug-in: org.eclipse.linuxtools.tmf.core.tests | |
262 | package: org.eclipse.linuxtools.tmf.core.tests.stubs.analysis | |
263 | class: TestCtfAnalysis | |
264 | </pre> | |
265 | </p> | |
266 | ||
267 | <p> | |
268 | The following is an example of the extension point: | |
269 | <pre> | |
270 | <extension | |
271 | point="org.eclipse.linuxtools.tmf.core.analysis"> | |
272 | <module | |
273 | id="org.eclipse.linuxtools.tmf.core.tests.analysis.testctf" | |
274 | name="Test analysis ctf" | |
275 | analysis_module="org.eclipse.linuxtools.tmf.tests.stubs.analysis.TestCtfAnalysis" | |
276 | automatic="true"> | |
277 | </module> | |
278 | </extension> | |
279 | </pre> | |
280 | </p> | |
281 | </documentation> | |
282 | </annotation> | |
283 | ||
284 | <annotation> | |
285 | <appinfo> | |
286 | <meta.section type="apiinfo"/> | |
287 | </appinfo> | |
288 | <documentation> | |
289 | <p> | |
290 | 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. | |
291 | </p> | |
292 | <p> | |
293 | 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. | |
294 | </p> | |
295 | </documentation> | |
296 | </annotation> | |
297 | ||
298 | ||
299 | <annotation> | |
300 | <appinfo> | |
301 | <meta.section type="copyright"/> | |
302 | </appinfo> | |
303 | <documentation> | |
304 | Copyright (c) 2013 École Polytechnique de Montréal | |
305 | ||
306 | 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> | |
307 | </documentation> | |
308 | </annotation> | |
309 | ||
310 | </schema> |