Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmf: Support hideOutput extension point element for data providers #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PatrickTasse
Copy link
Contributor

What it does

Define constant DataProviderConstants.CONFIG_SEPARATOR.

Describe use of CONFIG_SEPARATOR in ITmfDataProviderConfigurator's createDataProviderDescriptors() method.

In DataProviderManager.getAvailableProviders(), filter-out data provider descriptors that are hidden by org.eclipse.linuxtools.tmf.core.analysis extension point's hideOutput element, ignoring any configuration id suffix. Extract the analysisId from the provider id's secondary id.

Describe use of data provider id as possible value of org.eclipse.linuxtools.tmf.core.analysis extension point's hideOutput element's output attribute.

Change org.eclipse.linuxtools.tmf.core.analysis extension point's hideOutput element's analysis_module attribute to be optional. This will enable hiding of data provider configurators.

How to test

Define data provider outputId's in the hideOutput extension point element.

Follow-ups

N/A

Review checklist

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

Define constant DataProviderConstants.CONFIG_SEPARATOR.

Describe use of CONFIG_SEPARATOR in ITmfDataProviderConfigurator's
createDataProviderDescriptors() method.

In DataProviderManager.getAvailableProviders(), filter-out data provider
descriptors that are hidden by org.eclipse.linuxtools.tmf.core.analysis
extension point's hideOutput element, ignoring any configuration id
suffix. Extract the analysisId from the provider id's secondary id.

Describe use of data provider id as possible value of
org.eclipse.linuxtools.tmf.core.analysis extension point's hideOutput
element's output attribute.

Change org.eclipse.linuxtools.tmf.core.analysis extension point's
hideOutput element's analysis_module attribute to be optional. This will
enable hiding of data provider configurators.

Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
@@ -222,10 +224,23 @@ public List<IDataProviderDescriptor> getAvailableProviders(@Nullable ITmfTrace t
return Collections.emptyList();
}
List<IDataProviderDescriptor> list = new ArrayList<>();
TmfAnalysisOutputManager manager = TmfAnalysisOutputManager.getInstance();
Copy link
Contributor

Choose a reason for hiding this comment

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

This introduces a coupling of analysis modules and data providers. Data Providers don't need to use analysis modules. However, in most case so far there is analysis module defined that the data provider is using. But, if we look outside the code coupling, data providers are outputs and hence it probably ok to expand the hideOutput extension point to data providers, especially, since analysis_id is optional in the extension point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not adding dependencies on modules however it causes the data provider manager to need to consider analysisId inside the outputId. We're only accessing the TmfAnalysisOutputManager to reuse its reading of the hideOutput extension point attribute. This could be factored out, however it would still be tied to the 'org.eclipse.linuxtools.tmf.core.analysis' extension point.

Perhaps it would be better to replicate the functionality of 'hideOutput' in 'org.eclipse.tracecompass.tmf.core.dataprovider' extension point? Then we can remove the handling of analysisId completely (it could still be part of the outputId string but that would be opaque to the implementation).

Copy link
Contributor

@bhufmann bhufmann Mar 18, 2025

Choose a reason for hiding this comment

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

Sounds reasonable to have it in the data provider extension point. Would you implement a regex pattern to be able hide all data providers which, for example, are the same for each customization?

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