Prevent from sending a useless initial request from HistogramView
authorFrancois Chouinard <fchouinard@gmail.com>
Wed, 6 Jun 2012 20:52:24 +0000 (16:52 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Wed, 6 Jun 2012 20:52:24 +0000 (16:52 -0400)
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java

index 1a9c7f0857b44d15366ff117861c4ead2503550c..3a374f1e5820173466969f59b9512860d6340088 100644 (file)
@@ -38,8 +38,6 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 
 /**
- * <b><u>HistogramView</u></b>
- * <p>
  * The purpose of this view is to provide graphical time distribution statistics about the experiment/trace events.
  * <p>
  * The view is composed of two histograms and two controls:
@@ -50,6 +48,9 @@ import org.eclipse.swt.widgets.Composite;
  * <li>the window span (size of the time window of the smaller histogram).
  * </ul>
  * The histograms x-axis show their respective time range.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class HistogramView extends TmfView {
 
@@ -435,8 +436,10 @@ public class HistogramView extends TmfView {
         fCurrentEventTimeControl.setValue(fExperimentStartTime);
         fTimeSpanControl.setValue(fWindowSpan);
 
-        sendTimeRangeRequest(fExperimentStartTime, fExperimentStartTime + fWindowSpan);
-        sendFullRangeRequest(fullRange);
+        if (!fullRange.equals(TmfTimeRange.NULL_RANGE)) {
+            sendTimeRangeRequest(fExperimentStartTime, fExperimentStartTime + fWindowSpan);
+            sendFullRangeRequest(fullRange);
+        }
     }
 
     private TmfTimeRange updateExperimentTimeRange(TmfExperiment<ITmfEvent> experiment) {
@@ -473,9 +476,6 @@ public class HistogramView extends TmfView {
         if (fFullTraceRequest != null && !fFullTraceRequest.isCompleted()) {
             fFullTraceRequest.cancel();
         }
-        if (fullRange.equals(TmfTimeRange.NULL_RANGE)) {
-            return;
-        }
         int cacheSize = fCurrentExperiment.getCacheSize();
         fFullTraceRequest = new HistogramRequest(fFullTraceHistogram.getDataModel(), fullRange, (int) fFullTraceHistogram.fDataModel.getNbEvents(),
                 TmfDataRequest.ALL_DATA, cacheSize, ExecutionType.BACKGROUND);
This page took 0.025595 seconds and 5 git commands to generate.