use of org.eclipse.tracecompass.tmf.core.model.YModel in project tracecompass by tracecompass.
the class DataDrivenXYDataProvider method initSeries.
private Map<DisplayElement, IYModel> initSeries(TimeQueryFilter filter) {
if (!(filter instanceof SelectionTimeQueryFilter)) {
return Collections.emptyMap();
}
fLock.readLock().lock();
try {
Map<DisplayElement, IYModel> map = new HashMap<>();
int length = filter.getTimesRequested().length;
for (Long id : ((SelectionTimeQueryFilter) filter).getSelectedItems()) {
DisplayElement displayElement = fIDToDisplayQuark.get(id);
if (displayElement != null) {
String name = String.valueOf(fIdToTitle.get(id));
map.put(displayElement, new YModel(id, name, new double[length]));
}
}
return map;
} finally {
fLock.readLock().unlock();
}
}
Aggregations