Fix time range synchronization issues
authorPatrick Tasse <patrick.tasse@gmail.com>
Fri, 16 Nov 2012 23:11:39 +0000 (18:11 -0500)
committerPatrick Tasse <patrick.tasse@gmail.com>
Mon, 19 Nov 2012 15:14:21 +0000 (10:14 -0500)
- ResourcesView is unnecessarily refreshing with initial window offset
on setFocus(). This is removed.

- TimeGraphViewer method resetStartFinishTime() causes time range
notification callback. The method is changed to call
setStartFinishTime() instead of setStartFinishTimeNotify().

- TimeGraphScale handling of mouse double-click is calling
resetStartFinishTime() expecting the notification. The notification is
now triggered explicitly by calling notifyStartFinishTime().

- HistogramView initial window span can be clipped if it is set early
when not enough events have been indexed in the trace. The full trace
histogram time range is now re-set on reception of TmfTraceUpdated
signal.

- The full trace histogram uses the zoom's duration in updateTimeRange()
on mouse up, and this duration could have been clipped. The method now
used the stored range duration, which does not get clipped.

Change-Id: Id480340933494855330fc6d4fae9429155efa88f
Reviewed-on: https://git.eclipse.org/r/8745
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bhufmann@gmail.com>
IP-Clean: Bernd Hufmann <bhufmann@gmail.com>
Tested-by: Bernd Hufmann <bhufmann@gmail.com>
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/FullTraceHistogram.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphScale.java

index ebdfc17eee0c76bfde99890fa175d9247d4acebf..0ed49350a8fdf3a1bf8dadb22dba866261cd16d5 100644 (file)
@@ -363,7 +363,6 @@ public class ResourcesView extends TmfView {
      */
     @Override
     public void setFocus() {
-        refresh(INITIAL_WINDOW_OFFSET);
         fTimeGraphViewer.setFocus();
     }
 
index 2819c885a4e6c6dd88e114a11fc0a9db1fbc9245..2591c1e64a189abdab83e3feca9db2404084456d 100644 (file)
@@ -129,7 +129,7 @@ public class FullTraceHistogram extends Histogram implements MouseMoveListener {
                 return;
             }
 
-            ((HistogramView) fParentView).updateTimeRange(fRangeStartTime, fRangeStartTime + fZoom.getDuration());
+            ((HistogramView) fParentView).updateTimeRange(fRangeStartTime, fRangeStartTime + fRangeDuration);
 
         }
     }
index 980a69964d64773fda8edfaa872b7db63713fe6b..0e54bad32ef78a3a1b4abf386d2552240e1621db 100644 (file)
@@ -489,6 +489,8 @@ public class HistogramView extends TmfView {
         fFullTraceHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
         fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
 
+        fFullTraceHistogram.setTimeRange(fTimeRangeHistogram.getStartTime(), fWindowSpan);
+
         if ((fFullTraceRequest != null) && fFullTraceRequest.getRange().getEndTime().compareTo(signal.getRange().getEndTime()) < 0) {
             sendFullRangeRequest(fullRange);
         }
index 35e5a5dd65854114d9af54a5925375985046e305..23225402d716bb7cf583e21d810efa5a9934cc7a 100644 (file)
@@ -586,7 +586,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
 
     @Override
     public void resetStartFinishTime() {
-        setStartFinishTimeNotify(_time0_, _time1_);
+        setStartFinishTime(_time0_, _time1_);
         _timeRangeFixed = false;
     }
 
index 018a26b6f31a73f5bbbce8486300fe4bd6b5deb4..c620e9e488097adf5192d6423b0ccc41ef6a2000 100644 (file)
@@ -502,6 +502,7 @@ public class TimeGraphScale extends TimeGraphBaseControl implements
     public void mouseDoubleClick(MouseEvent e) {
         if (e.button == 1 && null != _timeProvider && _timeProvider.getTime0() != _timeProvider.getTime1() && (e.stateMask & SWT.BUTTON_MASK) == 0) {
             _timeProvider.resetStartFinishTime();
+            _timeProvider.notifyStartFinishTime();
             _time0bak = _timeProvider.getTime0();
             _time1bak = _timeProvider.getTime1();
         }
This page took 0.035213 seconds and 5 git commands to generate.