# CTF trace type
tracetype.category.ctf = Common Trace Format
tracetype.type.ctf = Generic CTF Trace
+
+# Experiment type
+experimenttype.type.generic = Generic Experiment
name="%tracetype.type.ctf"
trace_type="org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace">
</type>
+ <experiment
+ id="org.eclipse.linuxtools.tmf.core.experiment.generic"
+ name="%experimenttype.type.generic"
+ experiment_type="org.eclipse.linuxtools.tmf.core.trace.TmfExperiment">
+ </experiment>
</extension>
</plugin>
<meta.schema plugin="org.eclipse.linuxtools.tmf.core" id="tracetype" name="TMF Trace Type"/>
</appinfo>
<documentation>
- This extension point is used to contribute new trace types to the generic components of the TMF framework.
+ This extension point is used to contribute new trace types or experiment types to the generic components of the TMF framework.
</documentation>
</annotation>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="category"/>
<element ref="type"/>
+ <element ref="experiment"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
</complexType>
</element>
+ <element name="experiment">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The unique ID that identifies this experiment type.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The type name as it is displayed to the end user.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="category" type="string">
+ <annotation>
+ <documentation>
+ An optional attribute that is composed of the category ID. The referenced category must be declared in a corresponding category element.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.tracetype/category/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="experiment_type" type="string" use="required">
+ <annotation>
+ <documentation>
+ The fully qualified name of a class that extends the <samp>TmfExperiment</samp> class
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.linuxtools.tmf.core.trace.TmfExperiment:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appinfo>
<meta.section type="since"/>
<meta.section type="examples"/>
</appinfo>
<documentation>
- Example use of the tmftracetype extension point for generic CTF traces (CtfTmfTrace):
+ Example use of the tmftracetype extension point for generic CTF traces (CtfTmfTrace) and a category-less generic experiment type:
<extension
point="org.eclipse.linuxtools.tmf.core.tracetype">
name="Generic CTF Trace"
trace_type="org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace">
</type>
+ <experiment
+ id="org.eclipse.linuxtools.tmf.core.experiment.generic"
+ name="Generic experiment"
+ experiment_type="org.eclipse.linuxtools.tmf.core.trace.TmfExperiment">
+ </experiment>
</extension>
</documentation>
</annotation>
* trace_type: Has to implement ITmfTrace. It's *highly* recommend to extend 'TmfTrace' to get default implementations.
* event_type: Has to implement ITmfEvent. Once again, TmfEvent provides a reference implementation that should work in most cases.
+
+Experiment types using this extension point have to specify the following class:
+
+* experiment_type: Has to extend TmfExperiment. This class is the default experiment class, to be used to analyse sets of traces, where each trace is treated equally.
</documentation>
</annotation>
/*******************************************************************************
- * Copyright (c) 2011, 2014 Ericsson
+ * Copyright (c) 2011, 2014 Ericsson, É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 v1.0 which
* Contributors:
* Patrick Tasse - Initial API and implementation
* Matthew Khouzam - Added import functionalities
+ * Geneviève Bastien - Added support for experiment types
*******************************************************************************/
package org.eclipse.linuxtools.tmf.core.project.model;
/** Extension point element 'Type' */
public static final String TYPE_ELEM = "type"; //$NON-NLS-1$
+ /** Extension point element 'Experiment' */
+ public static final String EXPERIMENT_ELEM = "experiment"; //$NON-NLS-1$
+
/** Extension point attribute 'ID' */
public static final String ID_ATTR = "id"; //$NON-NLS-1$
/** Extension point attribute 'event_type' */
public static final String EVENT_TYPE_ATTR = "event_type"; //$NON-NLS-1$
+ /** Extension point attribute 'experiment_type' */
+ public static final String EXPERIMENT_TYPE_ATTR = "experiment_type"; //$NON-NLS-1$
+
/** Extension point attribute 'isDirectory' */
public static final String IS_DIR_ATTR = "isDirectory"; //$NON-NLS-1$
*/
public static final String CUSTOM_XML_CATEGORY = "Custom XML"; //$NON-NLS-1$
+ /** Default experiment type */
+ public static final String DEFAULT_EXPERIMENT_TYPE = "org.eclipse.linuxtools.tmf.core.experiment.generic"; //$NON-NLS-1$
+
// The mapping of available trace type IDs to their corresponding
// configuration element
private final Map<String, IConfigurationElement> fTraceTypeAttributes = new HashMap<>();
icon="icons/eview16/events_view.gif"
tracetype="org.eclipse.linuxtools.tmf.ui.type.ctf">
</type>
+ <experiment
+ tracetype="org.eclipse.linuxtools.tmf.core.experiment.generic"
+ icon="icons/elcl16/experiment.gif">
+ </experiment>
</extension>
</plugin>
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="type"/>
+ <element ref="experiment"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
</complexType>
</element>
+ <element name="experiment">
+ <complexType>
+ <sequence>
+ <element ref="eventsTableType" minOccurs="0" maxOccurs="1"/>
+ <element ref="defaultEditor" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="tracetype" type="string" use="required">
+ <annotation>
+ <documentation>
+ The unique ID that identifies this experiment type.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.linuxtools.tmf.core.tracetype/experiment/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+ The icon associated to the experiment type.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<element name="eventsTableType">
<annotation>
<documentation>
<meta.section type="examples"/>
</appinfo>
<documentation>
- Example use of the extension point: the GDB trace type, which specifies a custom icon and a custom editor. The 'type/tracetype' element has to point to an existing tmf.core.tracetype extension!
+ Example use of the extension point: the GDB trace type, which specifies a custom icon and a custom editor, also the generic experiment, which specifies a custom icon. The 'type/tracetype' element has to point to an existing tmf.core.tracetype extension!
<extension
point="org.eclipse.linuxtools.tmf.ui.tracetypeui">
class="org.eclipse.linuxtools.internal.gdbtrace.ui.views.events.GdbEventsTable">
</eventsTableType>
</type>
+ <experiment_type
+ tracetype="org.eclipse.linuxtools.tmf.core.experiment.generic"
+ icon="icons/elcl16/experiment.gif">
+ </experiment_type>
</extension>
</documentation>
</annotation>
/** Extension point element 'type' (should match the type in TmfTraceType) */
public static final String TYPE_ELEM = "type"; //$NON-NLS-1$
+ /**
+ * Extension point element 'experiment' (should match the type in
+ * TmfTraceType)
+ */
+ public static final String EXPERIMENT_ELEM = "experiment"; //$NON-NLS-1$
+
/** Extension point element 'Default editor' */
public static final String DEFAULT_EDITOR_ELEM = "defaultEditor"; //$NON-NLS-1$