Skip to content

Commit

Permalink
tmf: Fix DataProviderManager formatting in Eclipse
Browse files Browse the repository at this point in the history
While slightly amending a one-liner comment to keep it fit on that line.

Change-Id: I5f0537a38d0cd412feb0b71a1e6a9fec92ded15e
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/201596
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
marco-miller committed Apr 28, 2023
1 parent a4d244e commit c7f3ea1
Showing 1 changed file with 19 additions and 13 deletions.
Expand Up @@ -117,18 +117,20 @@ private void loadDataProviders() {
/**
* Gets or creates the data provider for the given trace.
* <p>
* This method should never be called from within a {@link TmfSignalHandler}.
* This method should never be called from within a
* {@link TmfSignalHandler}.
*
* @param trace
* An instance of {@link ITmfTrace}.
* Note, that trace can be an instance of TmfExperiment, too.
* An instance of {@link ITmfTrace}. Note, that trace can be an
* instance of TmfExperiment, too.
* @param id
* Id of the data provider. This ID can be the concatenation of a
* provider ID + ':' + a secondary ID used to differentiate multiple
* instances of a same provider.
* provider ID + ':' + a secondary ID used to differentiate
* multiple instances of a same provider.
* @param dataProviderClass
* Returned data provider must extend this class
* @return the data provider or null if no data provider is found for the input parameter.
* @return the data provider or null if no data provider is found for the
* input parameter.
* @since 8.0
*/
public synchronized @Nullable <T extends ITmfTreeDataProvider<? extends ITmfTreeDataModel>> T getOrCreateDataProvider(@NonNull ITmfTrace trace, String id, Class<T> dataProviderClass) {
Expand All @@ -139,7 +141,9 @@ private void loadDataProviders() {
String[] ids = id.split(DataProviderConstants.ID_SEPARATOR, 2);
for (ITmfTrace opened : TmfTraceManager.getInstance().getOpenedTraces()) {
if (TmfTraceManager.getTraceSetWithExperiment(opened).contains(trace)) {
/* if this trace or an experiment containing this trace is opened */
/*
* if this trace or an experiment containing it is opened
*/
IDataProviderFactory providerFactory = fDataProviderFactories.get(ids[0]);
if (providerFactory != null) {
dataProvider = ids.length > 1 ? providerFactory.createProvider(trace, String.valueOf(ids[1])) : providerFactory.createProvider(trace);
Expand All @@ -156,18 +160,20 @@ private void loadDataProviders() {

/**
* Get a data provider for the given trace if it already exists due to
* calling {@link #getOrCreateDataProvider(ITmfTrace, String, Class)} before.
* calling {@link #getOrCreateDataProvider(ITmfTrace, String, Class)}
* before.
*
* <p>
* This method should never be called from within a {@link TmfSignalHandler}.
* This method should never be called from within a
* {@link TmfSignalHandler}.
*
* @param trace
* An instance of {@link ITmfTrace}.
* Note, that trace can be an instance of TmfExperiment, too.
* An instance of {@link ITmfTrace}. Note, that trace can be an
* instance of TmfExperiment, too.
* @param id
* Id of the data provider. This ID can be the concatenation of a
* provider ID + ':' + a secondary ID used to differentiate multiple
* instances of a same provider.
* provider ID + ':' + a secondary ID used to differentiate
* multiple instances of a same provider.
* @param dataProviderClass
* Returned data provider must extend this class
* @return the data provider or null
Expand Down

0 comments on commit c7f3ea1

Please sign in to comment.