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">
6 <meta.schema plugin="org.eclipse.linuxtools.tmf.core" id="analysis" name="Trace Analysis Module"/>
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.
13 <element name="extension">
20 <sequence minOccurs="0" maxOccurs="unbounded">
21 <element ref="module"/>
22 <element ref="source"/>
23 <element ref="output"/>
25 <attribute name="point" type="string" use="required">
28 a fully qualified identifier of the target extension point
32 <attribute name="id" type="string">
35 an optional identifier of the extension instance
39 <attribute name="name" type="string">
42 an optional name of the extension instance
45 <meta.attribute translatable="true"/>
52 <element name="module">
54 <sequence minOccurs="0" maxOccurs="unbounded">
55 <element ref="parameter"/>
56 <element ref="tracetype"/>
58 <attribute name="id" type="string" use="required">
61 The unique ID that identifies this analysis module.
65 <attribute name="name" type="string" use="required">
68 The trace analysis module's name as it is displayed to the end user
72 <attribute name="analysis_module" type="string" use="required">
75 The fully qualified name of a class that implements the <samp>IAnalysisModule</samp> interface.
78 <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule"/>
82 <attribute name="icon" type="string">
85 The icon associated to this analysis module.
88 <meta.attribute kind="resource"/>
92 <attribute name="automatic" type="boolean">
95 Whether to execute this analysis automatically when trace is opened, or wait for the user to ask for it
99 <attribute name="applies_experiment" type="boolean">
102 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).
109 <element name="parameter">
112 Parameter for this module
116 <attribute name="name" type="string" use="required">
123 <attribute name="default_value" type="string">
126 A default value for this parameter
133 <element name="tracetype">
136 Allow to define the tracetypes this analysis applies to.
140 <attribute name="class" type="string" use="required">
143 The base trace class this analysis applies to or not (it also applies to traces extending this class).
146 <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.trace.ITmfTrace"/>
150 <attribute name="applies" type="boolean">
153 Does this tracetype element mean the class applies or not (default true)
160 <element name="source">
163 Specifies a class that provides analysis modules.
167 <attribute name="class" type="string" use="required">
170 The fully qualified name of a class that implements the <samp>IAnalysisModuleSource</samp> interface.
173 <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModuleSource"/>
180 <element name="output">
183 Associates an output with an analysis module or a class of analysis modules.
188 <element ref="analysisId"/>
189 <element ref="analysisModuleClass"/>
191 <attribute name="class" type="string" use="required">
194 The class of this output.
197 <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisOutput"/>
201 <attribute name="id" type="string">
204 An ID for this output. For example, for a view, it would be the view ID.
211 <element name="analysisId">
214 The output will be associated with a single analysis identified by the ID attribute.
218 <attribute name="id" type="string" use="required">
221 The full ID of the analysis.
224 <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.analysis/module/@id"/>
231 <element name="analysisModuleClass">
234 The output will be associated with all modules extending or implementing the 'class' attribute.
238 <attribute name="class" type="string" use="required">
241 The module class or interface the modules need to extend or implement for this output to be applicable.
244 <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule"/>
253 <meta.section type="since"/>
262 <meta.section type="examples"/>
266 For an example implementation of an analysis module see:
268 plug-in: org.eclipse.linuxtools.tmf.core.tests
269 package: org.eclipse.linuxtools.tmf.core.tests.stubs.analysis
270 class: TestCtfAnalysis
275 The following is an example of the extension point:
278 point="org.eclipse.linuxtools.tmf.core.analysis">
280 id="org.eclipse.linuxtools.tmf.core.tests.analysis.testctf"
281 name="Test analysis ctf"
282 analysis_module="org.eclipse.linuxtools.tmf.tests.stubs.analysis.TestCtfAnalysis"
283 automatic="true">
293 <meta.section type="apiinfo"/>
297 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.
300 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.
308 <meta.section type="copyright"/>
311 Copyright (c) 2013 École Polytechnique de Montréal
313 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>