Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-08-10 05:54:01 -0400
committerUwe Stieber2014-08-10 05:54:01 -0400
commit66e7fc4b4af42462d5ce91feaa3fb7829af305b8 (patch)
tree1f8eb960f84a419674fa15a28839b610031893cc
parent0a69236072f816ab841df86c99dee701a0b42c65 (diff)
downloadorg.eclipse.tcf-66e7fc4b4af42462d5ce91feaa3fb7829af305b8.tar.gz
org.eclipse.tcf-66e7fc4b4af42462d5ce91feaa3fb7829af305b8.tar.xz
org.eclipse.tcf-66e7fc4b4af42462d5ce91feaa3fb7829af305b8.zip
Target Explorer: Initialize disconnect step group also with the shared channel instance used for backend communication.
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/GetChannelStep.java58
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml1
5 files changed, 79 insertions, 9 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties
index ea2eda675..2334fb16a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties
@@ -22,6 +22,7 @@ ExtensionPoint.valueaddBindings.name=Value Add Bindings
OpenChannelStep.name=Open TCF channel
CloseChannelStep.name=Close TCF channel
ShutDownStep.name=Close all TCF channels
+GetChannelStep.name=Get TCF channel
LaunchValueAddStep.name=Launch value-add
ChainPeerStep.name=Redirect channel
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml
index eabb3f8cd..6a4632f2f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml
@@ -37,6 +37,11 @@
id="org.eclipse.tcf.te.tcf.core.shutDownStep"
class="org.eclipse.tcf.te.tcf.core.steps.ShutDownStep"
label="%ShutDownStep.name"/>
+
+ <step
+ id="org.eclipse.tcf.te.tcf.core.getChannelStep"
+ class="org.eclipse.tcf.te.tcf.core.steps.GetChannelStep"
+ label="%GetChannelStep.name"/>
<step
id="org.eclipse.tcf.te.tcf.core.channelmanager.launchValueAddStep"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/GetChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/GetChannelStep.java
new file mode 100644
index 000000000..49b6e019a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/GetChannelStep.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.steps;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes;
+
+/**
+ * Get channel step implementation.
+ */
+public class GetChannelStep extends AbstractPeerStep {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
+ Assert.isNotNull(context);
+ Assert.isNotNull(data);
+ Assert.isNotNull(fullQualifiedId);
+ Assert.isNotNull(monitor);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void execute(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
+ Assert.isNotNull(context);
+ Assert.isNotNull(data);
+ Assert.isNotNull(fullQualifiedId);
+ Assert.isNotNull(monitor);
+ Assert.isNotNull(callback);
+
+ IChannel channel = Tcf.getChannelManager().getChannel(getActivePeerContext(context, data, fullQualifiedId));
+ if (channel != null) {
+ StepperAttributeUtil.setProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data, channel, true);
+ }
+ callback(data, fullQualifiedId, callback, Status.OK_STATUS, null);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java
index cbdb61f46..d888bf410 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java
@@ -9,6 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.core.steps;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
@@ -24,30 +25,34 @@ import org.eclipse.tcf.te.tcf.core.Tcf;
*/
public class ShutDownStep extends AbstractPeerStep {
- /**
- * Constructor.
- */
- public ShutDownStep() {
- }
-
/* (non-Javadoc)
* @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
+ Assert.isNotNull(context);
+ Assert.isNotNull(data);
+ Assert.isNotNull(fullQualifiedId);
+ Assert.isNotNull(monitor);
}
/* (non-Javadoc)
* @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
- public void execute(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
- Protocol.invokeAndWait(new Runnable() {
+ public void execute(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, final IProgressMonitor monitor, final ICallback callback) {
+ Assert.isNotNull(context);
+ Assert.isNotNull(data);
+ Assert.isNotNull(fullQualifiedId);
+ Assert.isNotNull(monitor);
+ Assert.isNotNull(callback);
+
+ Protocol.invokeLater(new Runnable() {
@Override
public void run() {
Tcf.getChannelManager().shutdown(getActivePeerContext(context, data, fullQualifiedId));
+ callback(data, fullQualifiedId, callback, Status.OK_STATUS, null);
}
});
- callback(data, fullQualifiedId, callback, Status.OK_STATUS, null);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
index e1f139086..907b76aa1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
@@ -234,6 +234,7 @@
<parameter name="stateOnError" value="disconnected" />
</reference>
<reference id="org.eclipse.tcf.te.runtime.stepper.cancelJobsStep"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.getChannelStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.stopDebuggerStep"/>
<reference id="org.eclipse.tcf.te.tcf.core.shutDownStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.stopSimulatorStep"/>

Back to the top