Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2014-01-23 10:47:43 -0500
committerPatrick Tasse2014-01-27 13:24:44 -0500
commit390ed2f776c7d5412486a0d5c9412ed0536ecddd (patch)
treeb6a6e1c73232abdf0be525e71c0b9ebb3fa8ef13
parentc01d560a606e0e9b14a3f882db591512cd07b3e3 (diff)
downloadorg.eclipse.linuxtools-390ed2f776c7d5412486a0d5c9412ed0536ecddd.tar.gz
org.eclipse.linuxtools-390ed2f776c7d5412486a0d5c9412ed0536ecddd.tar.xz
org.eclipse.linuxtools-390ed2f776c7d5412486a0d5c9412ed0536ecddd.zip
tmf: Bug 426468: Wrong filter label provider in Control Flow view
Change-Id: Ia3813039e0c0362b95b894bac5fb7b4dd7f6af9c Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/21000 Tested-by: Hudson CI Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com> IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
index 12ef3d2e1f..e269587af0 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
@@ -45,6 +45,7 @@ import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeLinkEvent;
import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
+import org.eclipse.swt.widgets.Composite;
/**
* The Control Flow view main object
@@ -193,11 +194,33 @@ public class ControlFlowView extends AbstractTimeGraphView {
}
+ private static class ControlFlowFilterLabelProvider extends TreeLabelProvider {
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ ControlFlowEntry entry = (ControlFlowEntry) element;
+
+ if (columnIndex == 0) {
+ return entry.getName();
+ } else if (columnIndex == 1) {
+ return Integer.toString(entry.getThreadId());
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
// ------------------------------------------------------------------------
// Internal
// ------------------------------------------------------------------------
@Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ getTimeGraphCombo().setFilterLabelProvider(new ControlFlowFilterLabelProvider());
+ }
+
+ @Override
protected void buildEventList(final ITmfTrace trace, IProgressMonitor monitor) {
setStartTime(Long.MAX_VALUE);
setEndTime(Long.MIN_VALUE);

Back to the top