tmf.core: Introduce arbitrary/abstract data provider#258
Merged
MatthewKhouzam merged 1 commit intoeclipse-tracecompass:masterfrom Apr 30, 2025
Merged
Conversation
1ca2e07 to
47b356a
Compare
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>
47b356a to
c534dc9
Compare
MatthewKhouzam
commented
Apr 30, 2025
Contributor
Author
MatthewKhouzam
left a comment
There was a problem hiding this comment.
I approve. Bernd, do you?
Contributor
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. |
bhufmann
approved these changes
Apr 30, 2025
Contributor
bhufmann
left a comment
There was a problem hiding this comment.
Thanks for the contribution and collaboration!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
This is the first step in having arbitrary data providers. With this PR arbitrary data providers that are not instances of
ITmfTreeDataProvidercan be created byIDataProviderFactoryimplementations and through theDataProviderManager. This helps with project such as report and other timeless or non-tree based views.This PR adds new methods to
IDataProviderFactoryto create provider returning only this newITmfDataProviderinterface. It deprecate existingcreateProvidermethods inIDataProviderFactoryin 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
ITmfDataProviderinterface to theDataProviderManager. Deprecate existing get and create methods for data providers inDataProviderManagerin favour of the new APIs.ITmfDataProviderinterfaceIDataProviderFactory.createDataProvider(ITmfTrace)andIDataProviderFactory.createDataProvider(ITmfTrace, String)DataProviderManager.fetchExistingDataProvider(ITmfTrace, String, Class)andDataProviderManager.fetchOrCreateDataProvider(ITmfTrace, String, Class)IDataProviderFactory.createProvider(ITmfTrace)andIDataProviderFactory.createProvider(ITmfTrace, String)DataProviderManager.getExistingDataProvider(ITmfTrace, String, Class)andDataProviderManager.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
Base other views on this patch #242 , for example.
Review checklist
Signed-off-by: Matthew Khouzam matthew.khouzam@ericsson.com
Signed-off-by: Bernd Hufmann bernd.hufmann@ericsson.com