Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-05-29 04:19:32 -0400
committerUwe Stieber2013-05-29 04:43:57 -0400
commitf2babdc21db3e5d9b56d3489b82565418a9dab65 (patch)
tree21fb8d288f6069c2c4a2aad93a270bee8c709dd1
parent35b1ef9fc027d24823d95452b58dcc0f10fad503 (diff)
downloadorg.eclipse.tcf-f2babdc21db3e5d9b56d3489b82565418a9dab65.tar.gz
org.eclipse.tcf-f2babdc21db3e5d9b56d3489b82565418a9dab65.tar.xz
org.eclipse.tcf-f2babdc21db3e5d9b56d3489b82565418a9dab65.zip
Target Explorer: Fix process monitor single thread filter
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF77
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefreshService.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/filters/SingleThreadFilter.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java4
4 files changed, 55 insertions, 45 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF
index 739b23145..d87a84bc5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF
@@ -1,38 +1,39 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tcf.te.tcf.processes.core;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.tcf.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.model;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.services;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.core.model;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.locator;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.stepper;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tcf.te.tcf.processes.core.activator;x-internal:=true,
- org.eclipse.tcf.te.tcf.processes.core.interfaces,
- org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher,
- org.eclipse.tcf.te.tcf.processes.core.interfaces.steps,
- org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing;x-internal:=true,
- org.eclipse.tcf.te.tcf.processes.core.launcher,
- org.eclipse.tcf.te.tcf.processes.core.model,
- org.eclipse.tcf.te.tcf.processes.core.model.interfaces,
- org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime,
- org.eclipse.tcf.te.tcf.processes.core.model.internal.factory;x-internal:=true,
- org.eclipse.tcf.te.tcf.processes.core.model.nodes,
- org.eclipse.tcf.te.tcf.processes.core.model.runtime,
- org.eclipse.tcf.te.tcf.processes.core.model.runtime.listener,
- org.eclipse.tcf.te.tcf.processes.core.model.runtime.services,
- org.eclipse.tcf.te.tcf.processes.core.model.steps,
- org.eclipse.tcf.te.tcf.processes.core.nls;x-internal:=true,
- org.eclipse.tcf.te.tcf.processes.core.steps
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.processes.core;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.tcf.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.core.model;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.stepper;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.processes.core.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.interfaces,
+ org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher,
+ org.eclipse.tcf.te.tcf.processes.core.interfaces.steps,
+ org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.launcher,
+ org.eclipse.tcf.te.tcf.processes.core.model,
+ org.eclipse.tcf.te.tcf.processes.core.model.interfaces,
+ org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime,
+ org.eclipse.tcf.te.tcf.processes.core.model.internal.factory;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.model.internal.services;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.model.nodes,
+ org.eclipse.tcf.te.tcf.processes.core.model.runtime,
+ org.eclipse.tcf.te.tcf.processes.core.model.runtime.listener,
+ org.eclipse.tcf.te.tcf.processes.core.model.runtime.services,
+ org.eclipse.tcf.te.tcf.processes.core.model.steps,
+ org.eclipse.tcf.te.tcf.processes.core.nls;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.steps
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefreshService.java
index 2dee29f58..0737a3de4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefreshService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefreshService.java
@@ -226,7 +226,18 @@ public class RuntimeModelRefreshService extends AbstractModelService<IRuntimeMod
if (parent == null) {
model.getService(IModelUpdateService.class).add(candidate);
} else {
- parent.add(candidate);
+ // Validate the the children are added to the real parent node
+ nodes = model.getService(IModelLookupService.class).lkupModelNodesById(parent.getStringProperty(IModelNode.PROPERTY_ID));
+ if (nodes.length > 0) {
+ // In fact we should have found just one parent
+ Assert.isTrue(nodes.length == 1);
+ Assert.isTrue(nodes[0] instanceof IProcessContextNode);
+ // Add to the real parent node
+ ((IProcessContextNode)nodes[0]).add(candidate);
+ } else {
+ // Add to the passed in parent node
+ parent.add(candidate);
+ }
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/filters/SingleThreadFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/filters/SingleThreadFilter.java
index a05cd6146..7ba01b27a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/filters/SingleThreadFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/filters/SingleThreadFilter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -33,7 +33,7 @@ public class SingleThreadFilter extends ViewerFilter {
parentElement = ((TreePath) parentElement).getLastSegment();
}
if (parentElement instanceof IProcessContextNode && element instanceof IProcessContextNode) {
- final AtomicBoolean selected = new AtomicBoolean();
+ final AtomicBoolean selected = new AtomicBoolean(true);
final Object pe = parentElement;
final Object e = element;
@@ -51,8 +51,6 @@ public class SingleThreadFilter extends ViewerFilter {
selected.set(!child.getName().equals(parent.getName()));
}
}
- } else {
- selected.set(true);
}
}
};
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java
index 54b1261b3..7f7243dbc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -242,7 +242,7 @@ public class ContentProviderDelegate implements ITreeContentProvider {
final Object[] children = getChildren(context);
if (children.length == 1 && children[0] instanceof IProcessContextNode) {
// Apply the single thread filter
- final AtomicBoolean selected = new AtomicBoolean();
+ final AtomicBoolean selected = new AtomicBoolean(true);
Runnable runnable = new Runnable() {
@Override
public void run() {

Back to the top