Fix context location after first event seek.
authorPatrick Tasse <patrick.tasse@gmail.com>
Wed, 22 Aug 2012 18:19:35 +0000 (14:19 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Wed, 22 Aug 2012 19:26:25 +0000 (15:26 -0400)
Change-Id: I84205cede4cf7d3a4f561b61cbcbf0812fece512
Reviewed-on: https://git.eclipse.org/r/7353
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java

index dcf21ed4dfc6e6600c0ff57ff94a69f637501536..e1b4ae0fec9a4d66af2e2d9205e5fde92c672446 100644 (file)
@@ -214,6 +214,12 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{
             currentLocation.setLocation(getEndTime().getValue() + 1, 0L);
         }
         context.setLocation(currentLocation);
+        if (location == null) {
+            CtfTmfEvent event = getIterator(this, context).getCurrentEvent();
+            if (event != null) {
+                currentLocation.setLocation(event.getTimestampValue(), 0);
+            }
+        }
         if(context.getRank() != 0) {
             context.setRank(ITmfContext.UNKNOWN_RANK);
         }
This page took 0.025327 seconds and 5 git commands to generate.