Skip to content

Conversation

@bhufmann
Copy link
Contributor

With this a data provider factory instance can advertise special capabilities that can be applied for the given data provider.

This commit adds code for that and implements the "canCreate" and "canDelete" capability. "canCreate" indicates that this instance can create a derived data provider. Use the IDataProviderFactory method getAdapter(ITmfDataProviderConfigurator) to obtains a ITmfDataProviderConfigurator. This interface has methods to get List describing the parameters needed to create a derived data provider using method createDataProvider.

"canDelete" indicates a the data provider can be deleted using the method ITmfDataProviderConfigurator#deleteDataProviderDescriptor.

[Added] capabilities data structure to IDataProviderDescriptor

see also eclipse-cdt-cloud/theia-trace-extension#1158

Signed-off-by: Bernd Hufmann [email protected]

* "canCreate" and "canDelete" capability.
*
* "canCreate" indicates that a given data provider can create a derived data
* provider. "canDelete" indicates that a the data provider can be deleted.
Copy link
Contributor

Choose a reason for hiding this comment

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

"a the"

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make sure, "canDelete" indicates that THIS data provider can be deleted, it is not related to deleting derived data providers that this data provider has created, correct? So it's the derived data providers that would have their own "canDelete" set to true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the derived data provide would set canDelete to true and not the parent data provider.

* Sets canDelete flag
*
* @param canDelete
* true if data provider can create a derived data provider
Copy link
Contributor

Choose a reason for hiding this comment

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

copy/paste error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

With this a data provider factory instance can advertise special
capabilities that can be applied for the given data provider.

This commit adds code for that and implements the "canCreate" and
"canDelete" capability. "canCreate" indicates that this instance
can create a derived data provider. Use the IDataProviderFactory method
getAdapter(ITmfDataProviderConfigurator.class) to obtains an instance of
ITmfDataProviderConfigurator. This interface has methods to get
List<ITmfConfigurationSourceType> describing the parameters needed to
create a derived data provider using method
ITmfDataProviderConfigurator#createDataProvider.

"canDelete" indicates a the data provider can be deleted using
method ITmfDataProviderConfigurator#deleteDataProviderDescriptor.

[Added] capabilities data structure to IDataProviderDescriptor

Signed-off-by: Bernd Hufmann <[email protected]>
@bhufmann bhufmann merged commit d9d17fa into eclipse-tracecompass:master Jan 7, 2025
4 checks passed
@bhufmann bhufmann deleted the dp-capabilities branch January 7, 2025 19:58
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