ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ctf.core / src / org / eclipse / linuxtools / tmf / ctf / core / CtfTmfContext.java
index b490fe7e9c132b146a58378f9ee389699bb8e273..0825b84f2fd1e4d46cdffa31bc5ff1191145328a 100644 (file)
@@ -64,7 +64,7 @@ public class CtfTmfContext implements ITmfContext {
      * @since 3.0
      */
     @Override
-    public ITmfLocation getLocation() {
+    public synchronized ITmfLocation getLocation() {
         return fCurLocation;
     }
 
@@ -77,7 +77,7 @@ public class CtfTmfContext implements ITmfContext {
      * @since 3.0
      */
     @Override
-    public void setLocation(ITmfLocation location) {
+    public synchronized void setLocation(ITmfLocation location) {
         fCurLocation = (CtfLocation) location;
         if (fCurLocation != null) {
             getIterator().seek(fCurLocation.getLocationInfo());
@@ -126,11 +126,12 @@ public class CtfTmfContext implements ITmfContext {
      */
     public synchronized boolean advance() {
         final CtfLocationInfo curLocationData = fCurLocation.getLocationInfo();
-        boolean retVal = getIterator().advance();
-        CtfTmfEvent currentEvent = getIterator().getCurrentEvent();
+        CtfIterator iterator = getIterator();
+        boolean retVal = iterator.advance();
+        CtfTmfEvent currentEvent = iterator.getCurrentEvent();
 
         if (currentEvent != null) {
-            final long timestampValue = currentEvent.getTimestamp().getValue();
+            final long timestampValue = iterator.getCurrentTimestamp();
             if (curLocationData.getTimestamp() == timestampValue) {
                 fCurLocation = new CtfLocation(timestampValue, curLocationData.getIndex() + 1);
             } else {
This page took 0.042399 seconds and 5 git commands to generate.