Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-07-10 09:51:37 -0400
committerUwe Stieber2014-07-10 09:51:37 -0400
commit36f1fcdb71921056fff2437b6bbdb3ad4b05d920 (patch)
tree55f6e042201dfcd490bc33aba1bc2b80748e710e
parent1b44dee5ddb43923c5bae8e992307f30c00521c9 (diff)
downloadorg.eclipse.tcf-36f1fcdb71921056fff2437b6bbdb3ad4b05d920.tar.gz
org.eclipse.tcf-36f1fcdb71921056fff2437b6bbdb3ad4b05d920.tar.xz
org.eclipse.tcf-36f1fcdb71921056fff2437b6bbdb3ad4b05d920.zip
Target Explorer: Fix channel manager step id's and registration and start fixing steps
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/ChannelManager.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/ChannelManager2.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager2.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/StepperOperationService.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/StepperOperationService.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/StreamListenerProxy.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/StreamListenerProxy.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ApplyPathMapsStep.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ApplyPathMapsStep.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ChainPeerStep.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/CloseChannelStep.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/CloseChannelStep.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/LaunchValueAddStep.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/LaunchValueAddStep.java)47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ShutdownValueAddStep.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ShutdownValueAddStep.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ChainPeersIterator.java40
14 files changed, 102 insertions, 66 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF
index 6dd2a83d0..0722e01da 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF
@@ -27,7 +27,9 @@ Export-Package: org.eclipse.tcf.te.tcf.core,
org.eclipse.tcf.te.tcf.core.interfaces.steps,
org.eclipse.tcf.te.tcf.core.interfaces.tracing,
org.eclipse.tcf.te.tcf.core.internal;x-internal:=true,
- org.eclipse.tcf.te.tcf.core.internal.services,
+ org.eclipse.tcf.te.tcf.core.internal.channelmanager;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.internal.services;x-internal:=true,
org.eclipse.tcf.te.tcf.core.internal.utils;x-internal:=true,
org.eclipse.tcf.te.tcf.core.iterators,
org.eclipse.tcf.te.tcf.core.jobs,
@@ -36,7 +38,6 @@ Export-Package: org.eclipse.tcf.te.tcf.core,
org.eclipse.tcf.te.tcf.core.nls;x-internal:=true,
org.eclipse.tcf.te.tcf.core.peers,
org.eclipse.tcf.te.tcf.core.steps,
- org.eclipse.tcf.te.tcf.core.steps.internal;x-internal:=true,
org.eclipse.tcf.te.tcf.core.streams,
org.eclipse.tcf.te.tcf.core.util,
org.eclipse.tcf.te.tcf.core.util.persistence,
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 3de543acd..e4537f856 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,3 +22,9 @@ ExtensionPoint.valueaddBindings.name=Value Add Bindings
OpenChannelStep.name=Open TCF channel
CloseChannelStep.name=Close TCF channel
ShutDownStep.name=Close all TCF channels
+
+LaunchValueAddStep.name=Launch value-add
+ChainPeerStep.name=Redirect channel
+ApplyPatMapsStep.name=Apply path map to channel
+CloseChannelStep.name=Close channel
+ShutdownValueAddStep.name=Shutdown value-add
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 1adf10ec1..7ec0813d4 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
@@ -19,7 +19,7 @@
</service>
<service
- class="org.eclipse.tcf.te.tcf.core.internal.StepperOperationService"
+ class="org.eclipse.tcf.te.tcf.core.internal.channelmanager.StepperOperationService"
id="org.eclipse.tcf.te.tcf.core.services.stepperOperation">
<serviceType
bundleId="org.eclipse.tcf.te.runtime.stepper"
@@ -49,61 +49,61 @@
label="%ShutDownStep.name"/>
<step
- id="org.eclipse.tcf.te.tcf.core.internal.launchValueAddStep"
- class="org.eclipse.tcf.te.tcf.core.steps.internal.LaunchValueAddStep"
+ id="org.eclipse.tcf.te.tcf.core.channelmanager.launchValueAddStep"
+ class="org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps.LaunchValueAddStep"
label="%LaunchValueAddStep.name"/>
<step
- id="org.eclipse.tcf.te.tcf.core.internal.chainPeerStep"
- class="org.eclipse.tcf.te.tcf.core.steps.internal.ChainPeerStep"
+ id="org.eclipse.tcf.te.tcf.core.channelmanager.chainPeerStep"
+ class="org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps.ChainPeerStep"
label="%ChainPeerStep.name"/>
<step
- id="org.eclipse.tcf.te.tcf.core.internal.applyPathMapsStep"
- class="org.eclipse.tcf.te.tcf.core.steps.internal.ApplyPathMapsStep"
+ id="org.eclipse.tcf.te.tcf.core.channelmanager.applyPathMapsStep"
+ class="org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps.ApplyPathMapsStep"
label="%ApplyPatMapsStep.name"/>
<step
- id="org.eclipse.tcf.te.tcf.core.internal.closeChannelStep"
- class="org.eclipse.tcf.te.tcf.core.steps.internal.CloseChannelStep"
+ id="org.eclipse.tcf.te.tcf.core.channelmanager.closeChannelStep"
+ class="org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps.CloseChannelStep"
label="%CloseChannelStep.name"/>
<step
- id="org.eclipse.tcf.te.tcf.core.internal.shutdownValueAddsStepGroup"
- class="org.eclipse.tcf.te.tcf.core.steps.internal.ShutdownValueAddStep"
+ id="org.eclipse.tcf.te.tcf.core.channelmanager.shutdownValueAddsStepGroup"
+ class="org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps.ShutdownValueAddStep"
label="%ShutdownValueAddStep.name"/>
</extension>
<!-- Step contributions -->
<extension point="org.eclipse.tcf.te.runtime.stepper.stepGroups">
- <stepGroup id="org.eclipse.tcf.te.tcf.core.openChannelStepGroup">
+ <stepGroup id="org.eclipse.tcf.te.tcf.core.channelmanager.openChannelStepGroup">
<references>
- <reference id="org.eclipse.tcf.te.tcf.core.launchValueAddsStepGroup"/>
- <reference id="org.eclipse.tcf.te.tcf.core.chainPeersStepGroup"/>
- <reference id="org.eclipse.tcf.te.tcf.core.internal.applyPathMapsStep"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.launchValueAddsStepGroup"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.chainPeersStepGroup"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.applyPathMapsStep"/>
</references>
</stepGroup>
- <stepGroup id="org.eclipse.tcf.te.tcf.core.internal.launchValueAddsStepGroup"
+ <stepGroup id="org.eclipse.tcf.te.tcf.core.channelmanager.launchValueAddsStepGroup"
iterator="org.eclipse.tcf.te.tcf.core.iterators.ValueAddsIterator">
<references>
- <reference id="org.eclipse.tcf.te.tcf.core.internal.launchValueAddStep"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.launchValueAddStep"/>
</references>
</stepGroup>
- <stepGroup id="org.eclipse.tcf.te.tcf.core.internal.chainPeersStepGroup"
+ <stepGroup id="org.eclipse.tcf.te.tcf.core.channelmanager.chainPeersStepGroup"
iterator="org.eclipse.tcf.te.tcf.core.iterators.ChainPeersIterator">
<references>
- <reference id="org.eclipse.tcf.te.tcf.core.internal.chainPeerStep"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.chainPeerStep"/>
</references>
</stepGroup>
- <stepGroup id="org.eclipse.tcf.te.tcf.core.closeChannelStepGroup">
+ <stepGroup id="org.eclipse.tcf.te.tcf.core.channelmanager.closeChannelStepGroup">
<references>
- <reference id="org.eclipse.tcf.te.tcf.core.internal.closeChannelStep"/>
- <reference id="org.eclipse.tcf.te.tcf.core.shutdownValueAddsStepGroup"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.closeChannelStep"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.shutdownValueAddsStepGroup"/>
</references>
</stepGroup>
- <stepGroup id="org.eclipse.tcf.te.tcf.core.internal.shutdownValueAddsStepGroup"
+ <stepGroup id="org.eclipse.tcf.te.tcf.core.channelmanager.shutdownValueAddsStepGroup"
iterator="org.eclipse.tcf.te.tcf.core.iterators.ValueAddsIterator">
<references>
- <reference id="org.eclipse.tcf.te.tcf.core.internal.shutdownValueAddStep"/>
+ <reference id="org.eclipse.tcf.te.tcf.core.channelmanager.shutdownValueAddStep"/>
</references>
</stepGroup>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java
index 571a4eff9..eed7e683a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java
@@ -28,8 +28,8 @@ import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.protocol.Protocol.ChannelOpenListener;
import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tcf.te.tcf.core.internal.ChannelManager;
import org.eclipse.tcf.te.tcf.core.internal.Startup;
+import org.eclipse.tcf.te.tcf.core.internal.channelmanager.ChannelManager;
import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelOpenListener;
import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener;
import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IProtocolStateChangeListener;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/ChannelManager.java
index 902b3ff17..c2403d82b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/ChannelManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager;
import java.io.PrintWriter;
import java.io.StringWriter;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager2.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/ChannelManager2.java
index c8baf866c..8d1ea51e1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager2.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/ChannelManager2.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/StepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/StepperOperationService.java
index 99bdbcd5e..d922b2418 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/StepperOperationService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/StepperOperationService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager;
import org.eclipse.core.runtime.Assert;
import org.eclipse.osgi.util.NLS;
@@ -53,9 +53,9 @@ public class StepperOperationService extends AbstractStepperOperationService {
Assert.isTrue(context instanceof IPeer);
if (OPEN_CHANNEL.equals(operation))
- return "org.eclipse.tcf.te.tcf.core.openChannelStepGroup"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.tcf.core.channelmanager.openChannelStepGroup"; //$NON-NLS-1$
if (CLOSE_CHANNEL.equals(operation))
- return "org.eclipse.tcf.te.tcf.core.closeChannelStepGroup"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.tcf.core.channelmanager.closeChannelStepGroup"; //$NON-NLS-1$
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/StreamListenerProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/StreamListenerProxy.java
index e93cffbc5..13e00b2b5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/StreamListenerProxy.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/StreamListenerProxy.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager;
import java.util.ArrayList;
import java.util.Iterator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ApplyPathMapsStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ApplyPathMapsStep.java
index 93af0ed0b..080cdca2c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ApplyPathMapsStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ApplyPathMapsStep.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.steps.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ChainPeerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
index 2b03e5294..bae06eb14 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ChainPeerStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.steps.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/CloseChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/CloseChannelStep.java
index 715bcc8f8..67d5dfd90 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/CloseChannelStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/CloseChannelStep.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.steps.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/LaunchValueAddStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/LaunchValueAddStep.java
index 593153476..0cbcdaa2c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/LaunchValueAddStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/LaunchValueAddStep.java
@@ -8,12 +8,13 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.steps.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
@@ -43,7 +44,7 @@ public class LaunchValueAddStep extends AbstractPeerStep {
public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
IValueAdd valueAdd = (IValueAdd)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_VALUE_ADD, fullQualifiedId, data);
if (valueAdd == null) {
- throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "missing value add channel")); //$NON-NLS-1$
+ throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "Value-add descriptor instance not set.")); //$NON-NLS-1$
}
}
@@ -54,31 +55,47 @@ public class LaunchValueAddStep extends AbstractPeerStep {
public void execute(IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, final ICallback callback) {
final IValueAdd valueAdd = (IValueAdd)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_VALUE_ADD, fullQualifiedId, data);
final String peerId = getActivePeerContext(context, data, fullQualifiedId).getID();
- valueAdd.isAlive(peerId, new Callback() {
+
+ Runnable runnable = new Runnable() {
@Override
- protected void internalDone(Object caller, IStatus status) {
- boolean alive = ((Boolean)getResult()).booleanValue();
+ public void run() {
+ valueAdd.isAlive(peerId, new Callback() {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ boolean alive = ((Boolean)getResult()).booleanValue();
- if (!alive) {
- valueAdd.launch(peerId, callback);
- }
- else {
- callback(data, fullQualifiedId, callback, Status.OK_STATUS, null);
- }
+ if (!alive) {
+ valueAdd.launch(peerId, callback);
+ }
+ else {
+ callback(data, fullQualifiedId, callback, Status.OK_STATUS, null);
+ }
+ }
+ });
}
- });
+ };
+
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
}
/* (non-Javadoc)
* @see org.eclipse.tcf.te.runtime.stepper.steps.AbstractStep#rollback(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IStatus, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
- public void rollback(IStepContext context, IPropertiesContainer data, IStatus status, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
+ public void rollback(final IStepContext context, final IPropertiesContainer data, final IStatus status, final IFullQualifiedId fullQualifiedId, final IProgressMonitor monitor, final ICallback callback) {
final IValueAdd valueAdd = (IValueAdd)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_VALUE_ADD, fullQualifiedId, data);
final String peerId = getActivePeerContext(context, data, fullQualifiedId).getID();
- valueAdd.shutdown(peerId, callback);
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ valueAdd.shutdown(peerId, callback);
+ if (callback != null) callback.done(this, Status.OK_STATUS);
+ }
+ };
- super.rollback(context, data, status, fullQualifiedId, monitor, callback);
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ShutdownValueAddStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ShutdownValueAddStep.java
index c333ed43c..37fbbeb3f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ShutdownValueAddStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ShutdownValueAddStep.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.steps.internal;
+package org.eclipse.tcf.te.tcf.core.internal.channelmanager.steps;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ChainPeersIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ChainPeersIterator.java
index 6355634e4..11f1c99ea 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ChainPeersIterator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ChainPeersIterator.java
@@ -16,6 +16,7 @@ import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
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;
@@ -31,7 +32,7 @@ import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd;
*/
public class ChainPeersIterator extends AbstractPeerStepGroupIterator {
- private final List<IPeer> peers = new ArrayList<IPeer>();
+ /* default */ final List<IPeer> peers = new ArrayList<IPeer>();
/**
* Constructor.
@@ -49,21 +50,32 @@ public class ChainPeersIterator extends AbstractPeerStepGroupIterator {
final IPeer peer = getActivePeerContext(context, data, fullQualifiedId);
final String peerId = peer.getID();
- IValueAdd[] valueAdds = ValueAddManager.getInstance().getValueAdd(peer);
- for (IValueAdd valueAdd : valueAdds) {
- IPeer valueAddPeer = valueAdd.getPeer(peerId);
- if (valueAddPeer != null) {
- peers.add(valueAddPeer);
- }
- }
+ peers.clear();
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ IValueAdd[] valueAdds = ValueAddManager.getInstance().getValueAdd(peer);
+ for (IValueAdd valueAdd : valueAdds) {
+ IPeer valueAddPeer = valueAdd.getPeer(peerId);
+ if (valueAddPeer != null) {
+ peers.add(valueAddPeer);
+ }
+ }
- String proxyConfiguration = peer.getAttributes().get(IPeerProperties.PROP_PROXIES);
- IPeer[] proxies = proxyConfiguration != null ? PeerDataHelper.decodePeerList(proxyConfiguration) : null;
+ String proxyConfiguration = peer.getAttributes().get(IPeerProperties.PROP_PROXIES);
+ if (proxyConfiguration != null) {
+ for (IPeer proxy : PeerDataHelper.decodePeerList(proxyConfiguration)) {
+ peers.add(proxy);
+ }
+ }
+
+ peers.add(peer);
+ }
+ };
- for (IPeer proxy : proxies) {
- peers.add(proxy);
- }
- peers.add(peer);
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
setIterations(peers.size());
}

Back to the top