diff options
author | Bernd Hufmann | 2015-02-10 16:17:48 +0000 |
---|---|---|
committer | Bernd Hufmann | 2015-02-13 11:41:33 +0000 |
commit | 12d85f6c1a3138b1cf2cb5916835b56792a6fdfc (patch) | |
tree | df83d938a35a63a0bb98111eb188028eace8b55f /org.eclipse.tracecompass.tmf.ui | |
parent | 414dd7f4c3888afa04041cb1df66f9235a3c976b (diff) | |
download | org.eclipse.tracecompass-12d85f6c1a3138b1cf2cb5916835b56792a6fdfc.tar.gz org.eclipse.tracecompass-12d85f6c1a3138b1cf2cb5916835b56792a6fdfc.tar.xz org.eclipse.tracecompass-12d85f6c1a3138b1cf2cb5916835b56792a6fdfc.zip |
tmf: Fix updating of 'Event in selection' statistics (Bug 459571)
Change-Id: I1ec247ddde1256ee324f84d2743916a2b488eff1
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/41538
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'org.eclipse.tracecompass.tmf.ui')
2 files changed, 15 insertions, 2 deletions
diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java index 3b5bfb8587..105855b9ec 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java @@ -10,6 +10,7 @@ * Mathieu Denis <mathieu.denis@polymtl.ca> - Initial API and implementation * Alexandre Montplaisir - Port to ITmfStatistics provider * Patrick Tasse - Support selection range + * Bernd Hufmann - Fix range selection updates *******************************************************************************/ package org.eclipse.tracecompass.tmf.ui.viewers.statistics; @@ -726,6 +727,17 @@ public class TmfStatisticsViewer extends TmfViewer { Map<String, Long> map = stats.getEventTypesInRange(start, end); updateStats(map); + /* + * Remove job from map so that new range selection updates can + * be processed. + */ + Map<ITmfTrace, Job> updateJobs; + if (fIsGlobal) { + updateJobs = fUpdateJobsGlobal; + } else { + updateJobs = fUpdateJobsPartial; + } + updateJobs.remove(fJobTrace); return Status.OK_STATUS; } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java index fee6794e68..68c822460a 100755 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2014 Ericsson + * Copyright (c) 2011, 2015 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -8,6 +8,7 @@ * * Contributors: * Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation + * Bernd Hufmann - Allow zero value in setValue() *******************************************************************************/ package org.eclipse.tracecompass.tmf.ui.viewers.statistics.model; @@ -60,7 +61,7 @@ public class TmfStatisticsValues { * The new value to set */ public void setValue(boolean global, long nb) { - if (nb > 0) { + if (nb >= 0) { if (global) { fNbEvents = nb; } else { |