You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4782,21 +4782,21 @@ Data providers are queried with a filter object, which usually contains a time r
4782
4782
* 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.
4783
4783
* COMPLETED if the underlying analysis is finished and we do not expect a different response for the query parameters.
4784
4784
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.coreorg.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.''
4786
4786
4787
4787
== Data provider types ==
4788
4788
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.
4790
4790
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.
4792
4792
4793
4793
=== XY ===
4794
4794
4795
4795
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.
4796
4796
4797
4797
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.
4798
4798
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.
4800
4800
4801
4801
Here is a simple example of XY data provider, retrieving data from a simple state system displaying the child attributes of the root attributes.
0 commit comments