<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.linuxtools.tmf.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
      <appinfo>
         <meta.schema plugin="org.eclipse.linuxtools.tmf.core" id="analysis" name="Trace Analysis Module"/>
      </appinfo>
      <documentation>
         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.
      </documentation>
   </annotation>

   <element name="extension">
      <annotation>
         <appinfo>
            <meta.element />
         </appinfo>
      </annotation>
      <complexType>
         <sequence minOccurs="0" maxOccurs="unbounded">
            <element ref="module"/>
            <element ref="source"/>
            <element ref="output"/>
            <element ref="parameterProvider"/>
            <element ref="listener"/>
            <element ref="tracetype"/>
            <element ref="hideOutput"/>
         </sequence>
         <attribute name="point" type="string" use="required">
            <annotation>
               <documentation>
                  a fully qualified identifier of the target extension point
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  an optional identifier of the extension instance
               </documentation>
            </annotation>
         </attribute>
         <attribute name="name" type="string">
            <annotation>
               <documentation>
                  an optional name of the extension instance
               </documentation>
               <appinfo>
                  <meta.attribute translatable="true"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="module">
      <complexType>
         <sequence minOccurs="0" maxOccurs="unbounded">
            <element ref="parameter"/>
            <element ref="tracetype"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  The unique ID that identifies this analysis module.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  The trace analysis module&apos;s name as it is displayed to the end user
               </documentation>
            </annotation>
         </attribute>
         <attribute name="analysis_module" type="string" use="required">
            <annotation>
               <documentation>
                  The fully qualified name of a class that implements the &lt;samp&gt;IAnalysisModule&lt;/samp&gt; interface.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="icon" type="string">
            <annotation>
               <documentation>
                  The icon associated to this analysis module.
               </documentation>
               <appinfo>
                  <meta.attribute kind="resource"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="automatic" type="boolean">
            <annotation>
               <documentation>
                  Whether to execute this analysis automatically when trace is opened, or wait for the user to ask for it
               </documentation>
            </annotation>
         </attribute>
         <attribute name="applies_experiment" type="boolean">
            <annotation>
               <documentation>
                  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&apos;s analysis (default false).
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="parameter">
      <annotation>
         <documentation>
            Parameter for this module
         </documentation>
      </annotation>
      <complexType>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  The parameter name
               </documentation>
            </annotation>
         </attribute>
         <attribute name="default_value" type="string">
            <annotation>
               <documentation>
                  A default value for this parameter
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="tracetype">
      <annotation>
         <documentation>
            Allow to define the tracetypes this analysis applies to.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  The base trace class this analysis applies to or not (it also applies to traces extending this class).
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.trace.ITmfTrace"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="applies" type="boolean">
            <annotation>
               <documentation>
                  Does this tracetype element mean the class applies or not (default true)
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  The analysis ID this tracetype applies to. Must be present if the tracetype is a top-level element, otherwise, the &apos;module&apos; element this is part of has precedence.
               </documentation>
               <appinfo>
                  <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.analysis/module/@id"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="source">
      <annotation>
         <documentation>
            Specifies a class that provides analysis modules.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  The fully qualified name of a class that implements the &lt;samp&gt;IAnalysisModuleSource&lt;/samp&gt; interface.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModuleSource"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="output">
      <annotation>
         <documentation>
            Associates an output with an analysis module or a class of analysis modules.
         </documentation>
      </annotation>
      <complexType>
         <choice>
            <element ref="analysisId"/>
            <element ref="analysisModuleClass"/>
         </choice>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  The class of this output.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisOutput"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  An ID for this output. For example, for a view, it would be the view ID.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="parameterProvider">
      <annotation>
         <documentation>
            Associates a parameter provider class with an analysis ID.
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="analysisId"/>
         </sequence>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  The class that contains this analysis parameter provider.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.tmf.core.analysis.IAnalysisParameterProvider"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="analysisId">
      <annotation>
         <documentation>
            The output will be associated with a single analysis identified by the ID attribute.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  The full ID of the analysis.
               </documentation>
               <appinfo>
                  <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.analysis/module/@id"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="analysisModuleClass">
      <annotation>
         <documentation>
            The output will be associated with all modules extending or implementing the &apos;class&apos; attribute.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  The module class or interface the modules need to extend or implement for this output to be applicable.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="listener">
      <complexType>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  Specify a class that will listen to new modules created. This listener will listen to the creation of any module.
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn=":org.eclipse.tracecompass.tmf.core.analysis.ITmfNewAnalysisModuleListener"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="hideOutput">
      <annotation>
         <documentation>
            Hide the output of an analysis for a given trace type. Does not handle inheritance by design.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="tracetype" type="string" use="required">
            <annotation>
               <documentation>
                  The trace type ID of the output to be hidden.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="analysis_module" type="string" use="required">
            <annotation>
               <documentation>
                  The analysis ID of the output to be hidden.

Note: this is not consistent with camelCase as it is consistent with the module element.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="output" type="string" use="required">
            <annotation>
               <documentation>
                  An ID for the output to be hidden. For example, for a view, it would be the view ID.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

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

   <annotation>
      <appinfo>
         <meta.section type="examples"/>
      </appinfo>
      <documentation>
         &lt;p&gt;
For an example implementation of an analysis module see:
&lt;pre&gt;
plug-in: org.eclipse.linuxtools.tmf.core.tests
package: org.eclipse.linuxtools.tmf.core.tests.stubs.analysis
class: TestCtfAnalysis
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;
The following is an example of the extension point:
&lt;pre&gt;
&lt;extension
         point=&quot;org.eclipse.linuxtools.tmf.core.analysis&quot;&gt;
      &lt;module
         id=&quot;org.eclipse.linuxtools.tmf.core.tests.analysis.testctf&quot;
         name=&quot;Test analysis ctf&quot;
         analysis_module=&quot;org.eclipse.linuxtools.tmf.tests.stubs.analysis.TestCtfAnalysis&quot;
         automatic=&quot;true&quot;&gt;
      &lt;/module&gt;
   &lt;/extension&gt;
&lt;/pre&gt;
&lt;/p&gt;
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="apiinfo"/>
      </appinfo>
      <documentation>
         &lt;p&gt;
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&apos;s, the analysis&apos; execution, cancellation, completion, the help texts, etc.
&lt;/p&gt;
&lt;p&gt;
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.
&lt;/p&gt;
      </documentation>
   </annotation>


   <annotation>
      <appinfo>
         <meta.section type="copyright"/>
      </appinfo>
      <documentation>
         Copyright (c) 2013 École Polytechnique de Montréal

All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at &amp;lt;a href=&amp;quot;https://www.eclipse.org/legal/epl-2.0/&amp;quot;&amp;gt;https://www.eclipse.org/legal/epl-2.0/&amp;lt;/a&amp;gt;

SPDX-License-Identifier: EPL-2.0
      </documentation>
   </annotation>

</schema>
