summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Dumais2013-05-09 15:03:25 (EDT)
committerMarc Khouzam2013-05-31 14:00:28 (EDT)
commite8cb904f9cbb6456106c1c95e9df88a85b422d04 (patch)
treeea801fbe48e85e8f76f9ff26924877b11be8f013
parentb7969ba527fa236487748f800d74f0d94266faea (diff)
downloadorg.eclipse.cdt-e8cb904f9cbb6456106c1c95e9df88a85b422d04.zip
org.eclipse.cdt-e8cb904f9cbb6456106c1c95e9df88a85b422d04.tar.gz
org.eclipse.cdt-e8cb904f9cbb6456106c1c95e9df88a85b422d04.tar.bz2
Bug 407673 - [visualizer] canvas filter on thread: sometimes wronglyrefs/changes/92/12692/3
hides thread Change-Id: I85c0d9d0c8f5200190da450fadcf1d232d043528 Reviewed-on: https://git.eclipse.org/r/12692 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java
index 09dce2c..8cf1459 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizerCanvasFilter.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Marc Dumais (Ericsson) - Initial API and implementation (Bug 405390)
+ * Marc Dumais (Ericsson) - Bug 407673
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
@@ -134,9 +135,11 @@ public class MulticoreVisualizerCanvasFilter {
* for all filter objects.
*/
public void updateFilter() {
- if (m_filterList == null)
+ if (m_filterList == null || m_canvas == null)
return;
+ VisualizerModel model = m_canvas.getModel();
+
resetCounters();
m_dynamicFilterList.clear();
@@ -147,7 +150,16 @@ public class MulticoreVisualizerCanvasFilter {
addElementToFilterList(elem);
// also add all its ancestors
- IVisualizerModelObject parent = elem.getParent();
+ IVisualizerModelObject parent;
+
+ // Bug 407673 - if element is a thread, lookup the parent (core)
+ // from the current model, to be sure it's up-to-date
+ if (elem instanceof VisualizerThread && model != null) {
+ parent = model.getThread(((VisualizerThread) elem).getGDBTID()).getParent();
+ }
+ else {
+ parent = elem.getParent();
+ }
while (parent != null) {
addElementToFilterList(parent);
parent = parent.getParent();