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