-
Notifications
You must be signed in to change notification settings - Fork 13
/
RosQueuesDataProviderFactory.java
38 lines (34 loc) · 1.56 KB
/
RosQueuesDataProviderFactory.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**********************************************************************
* Copyright (c) 2018 Ericsson, École Polytechnique de Montréal
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.tracecompass.incubator.internal.ros.core.analysis.queues;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.tmf.core.dataprovider.IDataProviderFactory;
import org.eclipse.tracecompass.tmf.core.model.tree.ITmfTreeDataModel;
import org.eclipse.tracecompass.tmf.core.model.tree.ITmfTreeDataProvider;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
/**
* {@link RosQueuesDataProvider} factory
*
* @author Christophe Bedard
*/
public class RosQueuesDataProviderFactory implements IDataProviderFactory {
@Override
public @Nullable ITmfTreeDataProvider<? extends ITmfTreeDataModel> createProvider(@NonNull ITmfTrace trace) {
RosQueuesAnalysis module = TmfTraceUtils.getAnalysisModuleOfClass(trace, RosQueuesAnalysis.class, RosQueuesAnalysis.getFullAnalysisId());
if (module != null) {
module.schedule();
return new RosQueuesDataProvider(trace, module);
}
return null;
}
}