Fix mouse wheel zoom in time range histogram
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / HistogramView.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010, 2011, 2012 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * William Bourque - Initial API and implementation
11 * Yuriy Vashchuk - GUI reorganisation, simplification and some related code improvements.
12 * Yuriy Vashchuk - Histograms optimisation.
13 * Yuriy Vashchuk - Histogram Canvas Heritage correction
14 * Francois Chouinard - Cleanup and refactoring
15 * Francois Chouinard - Moved from LTTng to TMF
16 *******************************************************************************/
17
18 package org.eclipse.linuxtools.tmf.ui.views.histogram;
19
20 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
21 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
22 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
23 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
24 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
25 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
26 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
27 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
28 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
29 import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
30 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
31 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
32 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
33 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
34 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
35 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
36 import org.eclipse.linuxtools.tmf.ui.editors.ITmfTraceEditor;
37 import org.eclipse.linuxtools.tmf.ui.views.TmfView;
38 import org.eclipse.swt.SWT;
39 import org.eclipse.swt.layout.GridData;
40 import org.eclipse.swt.layout.GridLayout;
41 import org.eclipse.swt.widgets.Composite;
42 import org.eclipse.ui.IEditorPart;
43
44 /**
45 * The purpose of this view is to provide graphical time distribution statistics about the trace events.
46 * <p>
47 * The view is composed of two histograms and two controls:
48 * <ul>
49 * <li>an event distribution histogram for the whole trace;
50 * <li>an event distribution histogram for current time window (window span);
51 * <li>the timestamp of the currently selected event;
52 * <li>the window span (size of the time window of the smaller histogram).
53 * </ul>
54 * The histograms x-axis show their respective time range.
55 *
56 * @version 2.0
57 * @author Francois Chouinard
58 */
59 public class HistogramView extends TmfView {
60
61 // ------------------------------------------------------------------------
62 // Constants
63 // ------------------------------------------------------------------------
64
65 /**
66 * The view ID as defined in plugin.xml
67 */
68 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.histogram"; //$NON-NLS-1$
69
70 // ------------------------------------------------------------------------
71 // Attributes
72 // ------------------------------------------------------------------------
73
74 // Parent widget
75 private Composite fParent;
76
77 // The current trace
78 private ITmfTrace fTrace;
79
80 // Current timestamp/time window - everything in the TIME_SCALE
81 private long fTraceStartTime;
82 private long fTraceEndTime;
83 private long fWindowStartTime;
84 private long fWindowEndTime;
85 private long fWindowSpan;
86 private long fCurrentTimestamp;
87
88 // Time controls
89 private HistogramTextControl fCurrentEventTimeControl;
90 private HistogramTextControl fTimeSpanControl;
91
92 // Histogram/request for the full trace range
93 private static FullTraceHistogram fFullTraceHistogram;
94 private HistogramRequest fFullTraceRequest;
95
96 // Histogram/request for the selected time range
97 private static TimeRangeHistogram fTimeRangeHistogram;
98 private HistogramRequest fTimeRangeRequest;
99
100 // ------------------------------------------------------------------------
101 // Constructor
102 // ------------------------------------------------------------------------
103
104 /**
105 * Default constructor
106 */
107 public HistogramView() {
108 super(ID);
109 }
110
111 @Override
112 public void dispose() {
113 if ((fTimeRangeRequest != null) && !fTimeRangeRequest.isCompleted()) {
114 fTimeRangeRequest.cancel();
115 }
116 if ((fFullTraceRequest != null) && !fFullTraceRequest.isCompleted()) {
117 fFullTraceRequest.cancel();
118 }
119 fFullTraceHistogram.dispose();
120 fTimeRangeHistogram.dispose();
121 fCurrentEventTimeControl.dispose();
122 fTimeSpanControl.dispose();
123 super.dispose();
124 }
125
126 // ------------------------------------------------------------------------
127 // TmfView
128 // ------------------------------------------------------------------------
129
130 @Override
131 public void createPartControl(Composite parent) {
132
133 fParent = parent;
134
135 // Control labels
136 final String currentEventLabel = Messages.HistogramView_currentEventLabel;
137 final String windowSpanLabel = Messages.HistogramView_windowSpanLabel;
138
139 // --------------------------------------------------------------------
140 // Set the HistogramView layout
141 // --------------------------------------------------------------------
142
143 Composite viewComposite = new Composite(fParent, SWT.FILL);
144 GridLayout gridLayout = new GridLayout();
145 gridLayout.numColumns = 2;
146 gridLayout.horizontalSpacing = 5;
147 gridLayout.verticalSpacing = 0;
148 gridLayout.marginHeight = 0;
149 gridLayout.marginWidth = 0;
150 viewComposite.setLayout(gridLayout);
151
152 // Use all available space
153 GridData gridData = new GridData();
154 gridData.horizontalAlignment = SWT.FILL;
155 gridData.verticalAlignment = SWT.FILL;
156 gridData.grabExcessHorizontalSpace = true;
157 viewComposite.setLayoutData(gridData);
158
159 // --------------------------------------------------------------------
160 // Time controls
161 // --------------------------------------------------------------------
162
163 Composite controlsComposite = new Composite(viewComposite, SWT.FILL);
164 gridLayout = new GridLayout();
165 gridLayout.numColumns = 2;
166 gridLayout.marginHeight = 0;
167 gridLayout.marginWidth = 0;
168 gridLayout.horizontalSpacing = 5;
169 gridLayout.verticalSpacing = 0;
170 gridLayout.makeColumnsEqualWidth = false;
171 gridLayout.marginLeft = 5;
172 gridLayout.marginRight = 5;
173 controlsComposite.setLayout(gridLayout);
174
175 // Current event time control
176 gridData = new GridData();
177 gridData.horizontalAlignment = SWT.CENTER;
178 gridData.verticalAlignment = SWT.CENTER;
179 fCurrentEventTimeControl = new HistogramCurrentTimeControl(this, controlsComposite, currentEventLabel, 0L);
180 fCurrentEventTimeControl.setLayoutData(gridData);
181 fCurrentEventTimeControl.setValue(0L);
182
183 // Window span time control
184 gridData = new GridData();
185 gridData.horizontalAlignment = SWT.CENTER;
186 gridData.verticalAlignment = SWT.CENTER;
187 fTimeSpanControl = new HistogramTimeRangeControl(this, controlsComposite, windowSpanLabel, 0L);
188 fTimeSpanControl.setLayoutData(gridData);
189 fTimeSpanControl.setValue(0L);
190
191 // --------------------------------------------------------------------
192 // Time range histogram
193 // --------------------------------------------------------------------
194
195 Composite timeRangeComposite = new Composite(viewComposite, SWT.FILL);
196 gridLayout = new GridLayout();
197 gridLayout.numColumns = 1;
198 gridLayout.marginHeight = 0;
199 gridLayout.marginWidth = 0;
200 gridLayout.marginTop = 5;
201 gridLayout.horizontalSpacing = 0;
202 gridLayout.verticalSpacing = 0;
203 gridLayout.marginLeft = 5;
204 gridLayout.marginRight = 5;
205 timeRangeComposite.setLayout(gridLayout);
206
207 // Use remaining horizontal space
208 gridData = new GridData();
209 gridData.horizontalAlignment = SWT.FILL;
210 gridData.verticalAlignment = SWT.FILL;
211 gridData.grabExcessHorizontalSpace = true;
212 timeRangeComposite.setLayoutData(gridData);
213
214 // Histogram
215 fTimeRangeHistogram = new TimeRangeHistogram(this, timeRangeComposite);
216
217 // --------------------------------------------------------------------
218 // Full range histogram
219 // --------------------------------------------------------------------
220
221 Composite fullRangeComposite = new Composite(viewComposite, SWT.FILL);
222 gridLayout = new GridLayout();
223 gridLayout.numColumns = 1;
224 gridLayout.marginHeight = 0;
225 gridLayout.marginWidth = 0;
226 gridLayout.marginTop = 5;
227 gridLayout.horizontalSpacing = 0;
228 gridLayout.verticalSpacing = 0;
229 gridLayout.marginLeft = 5;
230 gridLayout.marginRight = 5;
231 fullRangeComposite.setLayout(gridLayout);
232
233 // Use remaining horizontal space
234 gridData = new GridData();
235 gridData.horizontalAlignment = SWT.FILL;
236 gridData.verticalAlignment = SWT.FILL;
237 gridData.horizontalSpan = 2;
238 gridData.grabExcessHorizontalSpace = true;
239 fullRangeComposite.setLayoutData(gridData);
240
241 // Histogram
242 fFullTraceHistogram = new FullTraceHistogram(this, fullRangeComposite);
243
244 IEditorPart editor = getSite().getPage().getActiveEditor();
245 if (editor instanceof ITmfTraceEditor) {
246 ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
247 if (trace != null) {
248 traceSelected(new TmfTraceSelectedSignal(this, trace));
249 }
250 }
251 }
252
253 @Override
254 public void setFocus() {
255 fFullTraceHistogram.fCanvas.setFocus();
256 }
257
258 void refresh() {
259 fParent.layout(true);
260 }
261
262 // ------------------------------------------------------------------------
263 // Accessors
264 // ------------------------------------------------------------------------
265
266 /**
267 * Returns the current trace handled by the view
268 *
269 * @return the current trace
270 * @since 2.0
271 */
272 public ITmfTrace getTrace() {
273 return fTrace;
274 }
275
276 /**
277 * Returns the time range of the current selected window (base on default time scale).
278 *
279 * @return the time range of current selected window.
280 */
281 public TmfTimeRange getTimeRange() {
282 return new TmfTimeRange(
283 new TmfTimestamp(fWindowStartTime, ITmfTimestamp.NANOSECOND_SCALE),
284 new TmfTimestamp(fWindowEndTime, ITmfTimestamp.NANOSECOND_SCALE));
285 }
286
287 // ------------------------------------------------------------------------
288 // Operations
289 // ------------------------------------------------------------------------
290
291 /**
292 * Broadcast TmfSignal about new current time value.
293 * @param newTime the new current time.
294 */
295 void updateCurrentEventTime(long newTime) {
296 if (fTrace != null) {
297 TmfTimeRange timeRange = new TmfTimeRange(new TmfTimestamp(newTime, ITmfTimestamp.NANOSECOND_SCALE), TmfTimestamp.BIG_CRUNCH);
298 HistogramRequest request = new HistogramRequest(fTimeRangeHistogram.getDataModel(), timeRange, 0, 1, 0, ExecutionType.FOREGROUND) {
299 @Override
300 public void handleData(ITmfEvent event) {
301 if (event != null) {
302 TmfTimeSynchSignal signal = new TmfTimeSynchSignal(this, event.getTimestamp());
303 TmfSignalManager.dispatchSignal(signal);
304 }
305 }
306 };
307 fTrace.sendRequest(request);
308 }
309 }
310
311 /**
312 * Broadcast TmfSignal about new selected time range.
313 * @param startTime the new start time
314 * @param endTime the new end time
315 */
316 void updateTimeRange(long startTime, long endTime) {
317 if (fTrace != null) {
318 // Build the new time range; keep the current time
319 TmfTimeRange timeRange = new TmfTimeRange(
320 new TmfTimestamp(startTime, ITmfTimestamp.NANOSECOND_SCALE),
321 new TmfTimestamp(endTime, ITmfTimestamp.NANOSECOND_SCALE));
322 ITmfTimestamp currentTime = new TmfTimestamp(fCurrentTimestamp, ITmfTimestamp.NANOSECOND_SCALE);
323 fTimeSpanControl.setValue(endTime - startTime);
324
325 // Send the FW signal
326 TmfRangeSynchSignal signal = new TmfRangeSynchSignal(this, timeRange, currentTime);
327 TmfSignalManager.dispatchSignal(signal);
328 }
329 }
330
331 /**
332 * Broadcast TmfSignal about new selected time range.
333 * @param newDuration new duration (relative to current start time)
334 */
335 public synchronized void updateTimeRange(long newDuration) {
336 if (fTrace != null) {
337 long delta = newDuration - fWindowSpan;
338 long newStartTime = fWindowStartTime - (delta / 2);
339 setNewRange(newStartTime, newDuration);
340 }
341 }
342
343 private void setNewRange(long startTime, long duration) {
344 if (startTime < fTraceStartTime) {
345 startTime = fTraceStartTime;
346 }
347
348 long endTime = startTime + duration;
349 if (endTime > fTraceEndTime) {
350 endTime = fTraceEndTime;
351 if ((endTime - duration) > fTraceStartTime) {
352 startTime = endTime - duration;
353 } else {
354 startTime = fTraceStartTime;
355 }
356 }
357 updateTimeRange(startTime, endTime);
358 }
359
360 // ------------------------------------------------------------------------
361 // Signal handlers
362 // ------------------------------------------------------------------------
363
364 /**
365 * Handles trace opened signal. Loads histogram if new trace time range is not
366 * equal <code>TmfTimeRange.NULL_RANGE</code>
367 * @param signal the trace selected signal
368 * @since 2.0
369 */
370 @TmfSignalHandler
371 public void traceOpened(TmfTraceOpenedSignal signal) {
372 assert (signal != null);
373 fTrace = signal.getTrace();
374 loadTrace();
375 }
376
377 /**
378 * Handles trace selected signal. Loads histogram if new trace time range is not
379 * equal <code>TmfTimeRange.NULL_RANGE</code>
380 * @param signal the trace selected signal
381 * @since 2.0
382 */
383 @TmfSignalHandler
384 public void traceSelected(TmfTraceSelectedSignal signal) {
385 assert (signal != null);
386 if (fTrace != signal.getTrace()) {
387 fTrace = signal.getTrace();
388 loadTrace();
389 }
390 }
391
392 private void loadTrace() {
393 initializeHistograms();
394 fParent.redraw();
395 }
396
397 /**
398 * Handles trace closed signal. Clears the view and data model and cancels requests.
399 * @param signal the trace closed signal
400 * @since 2.0
401 */
402 @TmfSignalHandler
403 public void traceClosed(TmfTraceClosedSignal signal) {
404
405 if (signal.getTrace() != fTrace) {
406 return;
407 }
408
409 // Kill any running request
410 if ((fTimeRangeRequest != null) && !fTimeRangeRequest.isCompleted()) {
411 fTimeRangeRequest.cancel();
412 }
413 if ((fFullTraceRequest != null) && !fFullTraceRequest.isCompleted()) {
414 fFullTraceRequest.cancel();
415 }
416
417 // Initialize the internal data
418 fTrace = null;
419 fTraceStartTime = 0L;
420 fTraceEndTime = 0L;
421 fWindowStartTime = 0L;
422 fWindowEndTime = 0L;
423 fWindowSpan = 0L;
424 fCurrentTimestamp = 0L;
425
426 // Clear the UI widgets
427 fFullTraceHistogram.clear();
428 fTimeRangeHistogram.clear();
429 fCurrentEventTimeControl.setValue(0L);
430
431 fTimeSpanControl.setValue(0);
432 }
433
434 /**
435 * Handles trace range updated signal. Extends histogram according to the new time range. If a
436 * HistogramRequest is already ongoing, it will be cancelled and a new request with the new range
437 * will be issued.
438 *
439 * @param signal the trace range updated signal
440 * @since 2.0
441 */
442 @TmfSignalHandler
443 public void traceRangeUpdated(TmfTraceRangeUpdatedSignal signal) {
444
445 if (signal.getTrace() != fTrace) {
446 return;
447 }
448
449 TmfTimeRange fullRange = signal.getRange();
450
451 fTraceStartTime = fullRange.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
452 fTraceEndTime = fullRange.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
453
454 fFullTraceHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
455 fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
456
457 sendFullRangeRequest(fullRange);
458 }
459
460 /**
461 * Handles the trace updated signal. Used to update time limits (start and end time)
462 * @param signal the trace updated signal
463 * @since 2.0
464 */
465 @TmfSignalHandler
466 public void traceUpdated(TmfTraceUpdatedSignal signal) {
467 if (signal.getTrace() != fTrace) {
468 return;
469 }
470 TmfTimeRange fullRange = signal.getTrace().getTimeRange();
471 fTraceStartTime = fullRange.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
472 fTraceEndTime = fullRange.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
473
474 fFullTraceHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
475 fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
476
477 fFullTraceHistogram.setTimeRange(fTimeRangeHistogram.getStartTime(), fWindowSpan);
478 fTimeRangeHistogram.setTimeRange(fTimeRangeHistogram.getStartTime(), fWindowSpan);
479
480 if ((fFullTraceRequest != null) && fFullTraceRequest.getRange().getEndTime().compareTo(signal.getRange().getEndTime()) < 0) {
481 sendFullRangeRequest(fullRange);
482 }
483 }
484
485 /**
486 * Handles the current time updated signal. Sets the current time in the time range
487 * histogram as well as the full histogram.
488 *
489 * @param signal the signal to process
490 */
491 @TmfSignalHandler
492 public void currentTimeUpdated(TmfTimeSynchSignal signal) {
493 // Because this can't happen :-)
494 assert (signal != null);
495
496 // Update the selected event time
497 ITmfTimestamp currentTime = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE);
498 fCurrentTimestamp = currentTime.getValue();
499
500 // Notify the relevant widgets
501 fFullTraceHistogram.setCurrentEvent(fCurrentTimestamp);
502 fTimeRangeHistogram.setCurrentEvent(fCurrentTimestamp);
503 fCurrentEventTimeControl.setValue(fCurrentTimestamp);
504 }
505
506 /**
507 * Updates the current time range in the time range histogram and full range histogram.
508 * @param signal the signal to process
509 */
510 @TmfSignalHandler
511 public void timeRangeUpdated(TmfRangeSynchSignal signal) {
512 // Because this can't happen :-)
513 assert (signal != null);
514
515 if (fTrace != null) {
516 // Validate the time range
517 TmfTimeRange range = signal.getCurrentRange().getIntersection(fTrace.getTimeRange());
518 if (range == null) {
519 return;
520 }
521
522 // Update the time range
523 fWindowStartTime = range.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
524 fWindowEndTime = range.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
525 fWindowSpan = fWindowEndTime - fWindowStartTime;
526
527 // Notify the relevant widgets
528 sendTimeRangeRequest(fWindowStartTime, fWindowEndTime);
529 fFullTraceHistogram.setTimeRange(fWindowStartTime, fWindowSpan);
530
531 fTimeSpanControl.setValue(fWindowSpan);
532 }
533 }
534
535 // ------------------------------------------------------------------------
536 // Helper functions
537 // ------------------------------------------------------------------------
538
539 private void initializeHistograms() {
540 TmfTimeRange fullRange = updateTraceTimeRange();
541 long timestamp = fTrace.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
542 long startTime = fTrace.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
543 long duration = fTrace.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue() - startTime;
544
545 if ((fTimeRangeRequest != null) && !fTimeRangeRequest.isCompleted()) {
546 fTimeRangeRequest.cancel();
547 }
548 fTimeRangeHistogram.clear();
549 fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
550 fTimeRangeHistogram.setTimeRange(startTime, duration);
551 fTimeRangeHistogram.setCurrentEvent(timestamp);
552
553 if ((fFullTraceRequest != null) && !fFullTraceRequest.isCompleted()) {
554 fFullTraceRequest.cancel();
555 }
556 fFullTraceHistogram.clear();
557 fFullTraceHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
558 fFullTraceHistogram.setTimeRange(startTime, duration);
559 fFullTraceHistogram.setCurrentEvent(timestamp);
560
561 fWindowStartTime = startTime;
562 fWindowSpan = duration;
563 fWindowEndTime = startTime + duration;
564
565 fCurrentTimestamp = timestamp;
566 fCurrentEventTimeControl.setValue(fCurrentTimestamp);
567
568 fTimeSpanControl.setValue(duration);
569
570 if (!fullRange.equals(TmfTimeRange.NULL_RANGE)) {
571 sendTimeRangeRequest(startTime, startTime + duration);
572 sendFullRangeRequest(fullRange);
573 }
574 }
575
576 private TmfTimeRange updateTraceTimeRange() {
577 fTraceStartTime = 0L;
578 fTraceEndTime = 0L;
579
580 TmfTimeRange timeRange = fTrace.getTimeRange();
581 if (!timeRange.equals(TmfTimeRange.NULL_RANGE)) {
582 fTraceStartTime = timeRange.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
583 fTraceEndTime = timeRange.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
584 }
585 return timeRange;
586 }
587
588 private void sendTimeRangeRequest(long startTime, long endTime) {
589 if ((fTimeRangeRequest != null) && !fTimeRangeRequest.isCompleted()) {
590 fTimeRangeRequest.cancel();
591 }
592 TmfTimestamp startTS = new TmfTimestamp(startTime, ITmfTimestamp.NANOSECOND_SCALE);
593 TmfTimestamp endTS = new TmfTimestamp(endTime, ITmfTimestamp.NANOSECOND_SCALE);
594 TmfTimeRange timeRange = new TmfTimeRange(startTS, endTS);
595
596 fTimeRangeHistogram.clear();
597 fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime);
598 fTimeRangeHistogram.setTimeRange(startTime, endTime - startTime);
599
600 int cacheSize = fTrace.getCacheSize();
601 fTimeRangeRequest = new HistogramRequest(fTimeRangeHistogram.getDataModel(), timeRange, 0, TmfDataRequest.ALL_DATA, cacheSize, ExecutionType.FOREGROUND);
602 fTrace.sendRequest(fTimeRangeRequest);
603 }
604
605 private void sendFullRangeRequest(TmfTimeRange fullRange) {
606 if ((fFullTraceRequest != null) && !fFullTraceRequest.isCompleted()) {
607 fFullTraceRequest.cancel();
608 }
609 int cacheSize = fTrace.getCacheSize();
610 fFullTraceRequest = new HistogramRequest(fFullTraceHistogram.getDataModel(), fullRange, (int) fFullTraceHistogram.fDataModel.getNbEvents(),
611 TmfDataRequest.ALL_DATA, cacheSize, ExecutionType.BACKGROUND);
612 fTrace.sendRequest(fFullTraceRequest);
613 }
614
615 }
This page took 0.071423 seconds and 5 git commands to generate.