From: Patrick Tasse Date: Fri, 24 Aug 2012 17:52:57 +0000 (-0400) Subject: Fix for bug 387934: Single event experiment not shown in events table. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=736988dec9e1d4c8d2bcf92e13fb96b43a9987d4;p=deliverable%2Ftracecompass.git Fix for bug 387934: Single event experiment not shown in events table. Change-Id: Ic0984c905f2f7d5b7ca60734eda9e2b54f692243 Reviewed-on: https://git.eclipse.org/r/7386 Reviewed-by: Bernd Hufmann IP-Clean: Bernd Hufmann Tested-by: Bernd Hufmann Reviewed-by: Francois Chouinard IP-Clean: Francois Chouinard Tested-by: Francois Chouinard --- diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java index 66c700fb06..5143e6372c 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java @@ -175,19 +175,10 @@ public class TmfCheckpointIndexer> implements ITm fIndexingRequest = new TmfEventRequest(ITmfEvent.class, range, offset, TmfDataRequest.ALL_DATA, fCheckpointInterval, ITmfDataRequest.ExecutionType.BACKGROUND) { - private ITmfTimestamp startTime = null; - private ITmfTimestamp lastTime = null; - @Override public void handleData(final ITmfEvent event) { super.handleData(event); if (event != null) { - final ITmfTimestamp timestamp = event.getTimestamp(); - if (startTime == null) { - startTime = timestamp.clone(); - } - lastTime = timestamp.clone(); - // Update the trace status at regular intervals if ((getNbRead() % fCheckpointInterval) == 0) { updateTraceStatus(); @@ -208,8 +199,8 @@ public class TmfCheckpointIndexer> implements ITm } private void updateTraceStatus() { - if (getNbRead() != 0) { - signalNewTimeRange(startTime, lastTime); + if (fTrace.getNbEvents() > 0) { + signalNewTimeRange(fTrace.getStartTime(), fTrace.getEndTime()); } } };