use of org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager in project tracecompass by tracecompass.
the class ControlFlowCheckActiveProvider method isActive.
@Override
public boolean isActive(ITimeGraphEntry element) {
ThreadEntryModel model = ControlFlowView.getThreadEntryModel(element);
if (model != null) {
TmfTraceManager traceManager = TmfTraceManager.getInstance();
TmfTraceContext traceContext = traceManager.getCurrentTraceContext();
TmfTimeRange range = traceContext.getSelectionRange();
/* Take precedence of selection over window range. */
if (Objects.equals(range.getStartTime(), range.getEndTime())) {
range = traceContext.getWindowRange();
}
Set<Long> ids = getActiveIds((TimeGraphEntry) element, range);
return ids.contains(model.getId());
}
return false;
}
Aggregations