From 5929fadace47be1d71442dfe28ea97f198a9f3e8 Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Sun, 3 Jun 2012 09:16:22 -0400 Subject: [PATCH] Bug 378402: Implementation of ControlFlow view and Resources view for LTTng 2.0. --- .../ui/views/controlflow/ControlFlowView.java | 13 ++++++------- .../ui/views/resources/ResourcesView.java | 17 ++++++++--------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java index 362fd5d83b..d46072a2c0 100644 --- a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java +++ b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java @@ -260,7 +260,7 @@ public class ControlFlowView extends TmfView { } for (ControlFlowEntry entry : entryList) { if (fMonitor.isCanceled()) { - return; + break; } zoom(entry, fMonitor); } @@ -270,13 +270,12 @@ public class ControlFlowView extends TmfView { private void zoom(ControlFlowEntry entry, IProgressMonitor monitor) { if (fZoomStartTime <= fStartTime && fZoomEndTime >= fEndTime) { entry.setZoomedEventList(null); - return; - } - List zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, fResolution, monitor); - if (fMonitor.isCanceled()) { - return; + } else { + List zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, fResolution, monitor); + if (zoomedEventList != null) { + entry.setZoomedEventList(zoomedEventList); + } } - entry.setZoomedEventList(zoomedEventList); for (ControlFlowEntry child : entry.getChildren()) { if (fMonitor.isCanceled()) { return; diff --git a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java index f5c7893f53..6b8e11e9cf 100644 --- a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java +++ b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java @@ -227,19 +227,18 @@ public class ResourcesView extends TmfView { long resolution = Math.max(1, (fZoomEndTime - fZoomStartTime) / fDisplayWidth); for (TraceEntry traceEntry : entryList) { for (ITimeGraphEntry child : traceEntry.getChildren()) { - ResourcesEntry entry = (ResourcesEntry) child; - if (fZoomStartTime <= fStartTime && fZoomEndTime >= fEndTime) { - entry.setZoomedEventList(null); - continue; - } if (fMonitor.isCanceled()) { break; } - List zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, resolution, true, fMonitor); - if (fMonitor.isCanceled()) { - break; + ResourcesEntry entry = (ResourcesEntry) child; + if (fZoomStartTime <= fStartTime && fZoomEndTime >= fEndTime) { + entry.setZoomedEventList(null); + } else { + List zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, resolution, true, fMonitor); + if (zoomedEventList != null) { + entry.setZoomedEventList(zoomedEventList); + } } - entry.setZoomedEventList(zoomedEventList); } } redraw(); -- 2.34.1