Skip to content

Commit a62a40f

Browse files
committed
doc: Split example plugin into core and UI plug-in
- This allows to add the example.core plugin to the trace server - In Eclipse Trace Compass no change, but both core and UI have to be included - Fix bugs in example data providers - Updated developer guide to reflect this update. [Changed] Split example plugin into core and UI plug-in Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
1 parent cc5d49e commit a62a40f

39 files changed

+876
-52
lines changed

doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4782,21 +4782,21 @@ Data providers are queried with a filter object, which usually contains a time r
47824782
* RUNNING if the response was returned before the underlying analysis was completed, and querying the provider again with the same parameters can return a different model.
47834783
* COMPLETED if the underlying analysis is finished and we do not expect a different response for the query parameters.
47844784
4785-
''Note that a complete example of analysis, data provider and views can be found in the [https://github.com/eclipse-tracecompass/org.eclipse.tracecompass/blob/master/doc/org.eclipse.tracecompass.examples org.eclipse.tracecompass.examples plugin sources].''
4785+
''Note that a complete example of analysis and data provider can be found in the [https://github.com/eclipse-tracecompass/org.eclipse.tracecompass/blob/master/doc/org.eclipse.tracecompass.examples.core org.eclipse.tracecompass.examples.core plugin sources] and [https://github.com/eclipse-tracecompass/org.eclipse.tracecompass/blob/master/doc/org.eclipse.tracecompass.examples.ui org.eclipse.tracecompass.examples.ui plugin sources] respectively.''
47864786
47874787
== Data provider types ==
47884788
4789-
The base data provider returns a tree, as a list of '''TmfTreeDataModel''', with a name, ID and parent ID. The ID is unique to a provider type and the parent ID indicates which element from the list is the entry's parent to rebuild the tree hierarchy from the list of models.
4789+
The base data provider '''ITmfDataProvider''' is the interface each data provider type has to implement. The data provider factories create instances of such provider type. Tree data providers are of type '''ITmfTreeDataProvider''' extend the '''ITmfDataProvider''' interface and returns a tree, as a list of '''TmfTreeDataModel''', with a name, ID and parent ID. The ID is unique to a provider type and the parent ID indicates which element from the list is the entry's parent to rebuild the tree hierarchy from the list of models. Note such tree need to have limited size to not exceed the available memory.
47904790
4791-
The base '''TimeGraphEntryModel''' class extends this with a start time and end time. Concrete classes are free to add other fields, as long as the model is serializable.
4791+
The base '''TimeGraphEntryModel''' class extends this with a start time and end time. Concrete classes are free to add other fields, which can be used in the Eclipse Trace Context where the UI code can access the model type. However, in Trace Compass server context only fields defined in the Trace Server protocol will be serialized.
47924792
47934793
=== XY ===
47944794
47954795
The XY data provider type is used to associate an XY series to an entry from the tree. The data provider is queried with a filter that also contains a Collection of the IDs of the entries for which we want XY series. The response contains a map of the series for the desired IDs.
47964796
47974797
Each XY series can have its own x axis ('''ISeriesModel''' / '''SeriesModel''' - encapsulated in an '''ITmfXyModel''' / '''TmfXyModel''') or they can be shared by all models ('''IYModel''' / '''YModel''' encapsulated in an '''ITmfCommonXAxisModel''' / '''TmfCommonXAxisModel'''). The X axis is an array of longs, which makes it useful for a time axis or time buckets, but it can be used for any XY content.
47984798
4799-
The interface to implement is '''ITmfTreeXYDataProvider'''.
4799+
The interface to implement is '''ITmfTreeXYDataProvider'''. Abstract base classes exist for common use case, e.g. '''AbstractTreeDataProvider''' for tree data providers that are using a state system. Extend those classes if applicable.
48004800
48014801
Here is a simple example of XY data provider, retrieving data from a simple state system displaying the child attributes of the root attributes.
48024802
File renamed without changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>org.eclipse.tracecompass.examples.core</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.pde.PluginNature</nature>
26+
<nature>org.eclipse.jdt.core.javanature</nature>
27+
</natures>
28+
</projectDescription>

doc/org.eclipse.tracecompass.examples/.settings/org.eclipse.core.resources.prefs renamed to doc/org.eclipse.tracecompass.examples.core/.settings/org.eclipse.core.resources.prefs

File renamed without changes.

doc/org.eclipse.tracecompass.examples/.settings/org.eclipse.core.runtime.prefs renamed to doc/org.eclipse.tracecompass.examples.core/.settings/org.eclipse.core.runtime.prefs

File renamed without changes.

doc/org.eclipse.tracecompass.examples/.settings/org.eclipse.jdt.core.prefs renamed to doc/org.eclipse.tracecompass.examples.core/.settings/org.eclipse.jdt.core.prefs

File renamed without changes.

doc/org.eclipse.tracecompass.examples/.settings/org.eclipse.pde.api.tools.prefs renamed to doc/org.eclipse.tracecompass.examples.core/.settings/org.eclipse.pde.api.tools.prefs

File renamed without changes.

doc/org.eclipse.tracecompass.examples/.settings/org.eclipse.pde.prefs renamed to doc/org.eclipse.tracecompass.examples.core/.settings/org.eclipse.pde.prefs

File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: %Bundle-Name
4+
Bundle-SymbolicName: org.eclipse.tracecompass.examples.core;singleton:=true
5+
Bundle-Version: 1.0.12.qualifier
6+
Bundle-Localization: plugin
7+
Bundle-Activator: org.eclipse.tracecompass.examples.core.Activator
8+
Require-Bundle: org.eclipse.core.runtime,
9+
org.eclipse.tracecompass.common.core,
10+
org.eclipse.tracecompass.tmf.core,
11+
org.eclipse.core.resources,
12+
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional
13+
Bundle-ActivationPolicy: lazy
14+
Bundle-RequiredExecutionEnvironment: JavaSE-17
15+
Export-Package: org.eclipse.tracecompass.examples.core,
16+
org.eclipse.tracecompass.examples.core.analysis,
17+
org.eclipse.tracecompass.examples.core.data.provider
18+
Bundle-Vendor: %Bundle-Vendor
19+
Import-Package: com.google.common.collect
20+
Automatic-Module-Name: org.eclipse.tracecompass.examples.core
File renamed without changes.

0 commit comments

Comments
 (0)