use of org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal in project tracecompass by tracecompass.
the class XmlDataProviderManagerTest method testOneTraceWithExperimentAnalysis.
/**
* Test getting the XML data provider for one trace, with an analysis that
* applies to an experiment
*/
@Test
public void testOneTraceWithExperimentAnalysis() {
ITmfTrace trace = null;
try {
// Initialize the trace and module
trace = XmlUtilsTest.initializeTrace(TEST_TRACE);
TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(this, trace, null);
((TmfTrace) trace).traceOpened(signal);
// The data provider manager uses opened traces from the manager
TmfTraceManager.getInstance().traceOpened(signal);
// Get the view element from the file
Element viewElement = TmfXmlUtils.getElementInFile(TmfXmlTestFiles.EXPERIMENT.getPath().toOSString(), TmfXmlStrings.TIME_GRAPH_VIEW, EXPERIMENT_VIEW_ID);
assertNotNull(viewElement);
ITimeGraphDataProvider<@NonNull TimeGraphEntryModel> timeGraphProvider = XmlDataProviderManager.getInstance().getTimeGraphProvider(trace, viewElement);
assertNull(timeGraphProvider);
} finally {
if (trace != null) {
trace.dispose();
TmfTraceManager.getInstance().traceClosed(new TmfTraceClosedSignal(this, trace));
}
}
}
Aggregations