Skip to content

Conversation

@MatthewKhouzam
Copy link
Contributor

@MatthewKhouzam MatthewKhouzam commented Apr 22, 2025

What it does

This is the first step in having arbitrary data providers. With this PR arbitrary data providers that are not instances of ITmfTreeDataProvider can be created by IDataProviderFactory implementations and through the DataProviderManager. This helps with project such as report and other timeless or non-tree based views.

This PR adds new methods to IDataProviderFactory to create provider returning only this new ITmfDataProvider interface. It deprecate existing createProvider methods in IDataProviderFactory in favour of the new interfaces. The default implementations make sure that existing implementations will still work until they are migrated to the new methods.

It also add new methods to fetch and create data providers implementing ITmfDataProvider interface to the DataProviderManager. Deprecate existing get and create methods for data providers in DataProviderManager in favour of the new APIs.

  • [Added] base data provider ITmfDataProvider interface
  • [Added] IDataProviderFactory.createDataProvider(ITmfTrace) and IDataProviderFactory.createDataProvider(ITmfTrace, String)
  • [Added] DataProviderManager.fetchExistingDataProvider(ITmfTrace, String, Class) and DataProviderManager.fetchOrCreateDataProvider(ITmfTrace, String, Class)
  • [Deprecated] IDataProviderFactory.createProvider(ITmfTrace) and IDataProviderFactory.createProvider(ITmfTrace, String)
  • [Deprecated] DataProviderManager.getExistingDataProvider(ITmfTrace, String, Class) and DataProviderManager.getOrCreateDataProvider(ITmfTrace, String, Class)

How to test

All CI needs to run successful which will verify that existing data provider factory implementation work without changing to the new APIs, because every data provider is based on this.

For reports, a patch needs to be based on it and designed for reports at the moment, but other views can use it.

Follow-ups

  • In future releases, e.g. for 11.3.0, migrate all existing data provider factories to the new APIs
  • Remove deprecated APIs for 12.0.0 (Eclipse 2026.06) release

Base other views on this patch #242 , for example.

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

Signed-off-by: Matthew Khouzam matthew.khouzam@ericsson.com
Signed-off-by: Bernd Hufmann bernd.hufmann@ericsson.com

@MatthewKhouzam MatthewKhouzam requested a review from bhufmann April 22, 2025 13:44
@bhufmann bhufmann force-pushed the arbitrary-data-provider branch 2 times, most recently from 1ca2e07 to 47b356a Compare April 23, 2025 18:37
Add methods in IDataProviderFactory to create provider returning only
this new ITmfDataProvider interface.

Deprecate existing createProvider methods in IDataProviderFactory.

Add new methods to fetch and create data providers implementing
ITmfDataProvider interface.

Deprecate existing get and create methods for data providers in
DataProviderManager.

[Added] base data provider ITmfDataProvider interface
[Added] IDataProviderFactory.createDataProvider(ITmfTrace)
[Added] IDataProviderFactory.createDataProvider(ITmfTrace, String)
[Added] DataProviderManager.fetchExistingDataProvider(ITmfTrace, String,
Class)
[Added] DataProviderManager.fetchOrCreateDataProvider(ITmfTrace, String,
Class)
[Deprecated] IDataProviderFactory.createProvider(ITmfTrace)
[Deprecated] IDataProviderFactory.createProvider(ITmfTrace, String)
[Deprecated] DataProviderManager.getExistingDataProvider(ITmfTrace,
String, Class)
[Deprecated] DataProviderManager.getOrCreateDataProvider(ITmfTrace,
String, Class)

Change-Id: I8861028af4c368e2bbd610dd10d4b7b20d7a05de
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
@bhufmann bhufmann force-pushed the arbitrary-data-provider branch from 47b356a to c534dc9 Compare April 25, 2025 17:51
Copy link
Contributor Author

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve. Bernd, do you?

@bhufmann
Copy link
Contributor

I approve. Bernd, do you?

Thanks for approving my updates. I approve your contributions. Since you are the owner I'll put the approval on the PR and we can merge it.

Copy link
Contributor

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution and collaboration!

@MatthewKhouzam MatthewKhouzam merged commit d42baa9 into eclipse-tracecompass:master Apr 30, 2025
4 checks passed
@MatthewKhouzam MatthewKhouzam deleted the arbitrary-data-provider branch April 30, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants