Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-06-17 03:18:25 -0400
committerUwe Stieber2013-06-17 03:21:09 -0400
commitb35168239d3af6396d97dd8a994083a8e6b5b8ea (patch)
tree0f300d701c72892518db5b34dae76980cb9f9aa3 /target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core
parentd94176819583c52c9cc02ced1ec1d83971809952 (diff)
downloadorg.eclipse.tcf-b35168239d3af6396d97dd8a994083a8e6b5b8ea.tar.gz
org.eclipse.tcf-b35168239d3af6396d97dd8a994083a8e6b5b8ea.tar.xz
org.eclipse.tcf-b35168239d3af6396d97dd8a994083a8e6b5b8ea.zip
Target Explorer: Process explorer terminate action not checking for "canTerminate" context property
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.xml2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/properties/PropertyTester.java16
2 files changed, 17 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.xml
index f9fddd657..437f7d1b0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.xml
@@ -31,7 +31,7 @@
class="org.eclipse.tcf.te.tcf.processes.core.model.properties.PropertyTester"
id="org.eclipse.tcf.te.tcf.processes.core.model.properties"
namespace="org.eclipse.tcf.te.tcf.processes.core"
- properties="isAttached,canAttach,hasProcessContext"
+ properties="isAttached,canAttach,hasProcessContext,canTerminate"
type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode">
</propertyTester>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/properties/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/properties/PropertyTester.java
index 1419b2367..cebb0b3a3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/properties/PropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/properties/PropertyTester.java
@@ -76,6 +76,22 @@ public class PropertyTester extends org.eclipse.core.expressions.PropertyTester
return ((Boolean) expectedValue).booleanValue() == canAttach.get();
}
+
+ if ("canTerminate".equals(property) && expectedValue instanceof Boolean) { //$NON-NLS-1$
+ final AtomicBoolean canTerminate = new AtomicBoolean();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (node.getProcessContext() != null) {
+ canTerminate.set(node.getProcessContext().canTerminate());
+ }
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ return ((Boolean) expectedValue).booleanValue() == canTerminate.get();
+ }
}
return false;
}

Back to the top