diff options
author | Uwe Stieber | 2014-07-07 07:04:46 -0400 |
---|---|---|
committer | Uwe Stieber | 2014-07-07 07:04:46 -0400 |
commit | a9a1e47ae6d7f003232450c82cf413c2e2b6deca (patch) | |
tree | 4773c168d497fa9029f95c39bf875a734ff4d379 | |
parent | ecba7077369fdcb49bb0f2ffdfd25acb2e3953ba (diff) | |
download | org.eclipse.tcf-a9a1e47ae6d7f003232450c82cf413c2e2b6deca.tar.gz org.eclipse.tcf-a9a1e47ae6d7f003232450c82cf413c2e2b6deca.tar.xz org.eclipse.tcf-a9a1e47ae6d7f003232450c82cf413c2e2b6deca.zip |
Revert "Target Explorer: add steps for channel manager rework"
This reverts commit 8f170df14be2719dcc29ad8ec494fb8e3681478b.
17 files changed, 14 insertions, 679 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java index 0ef68d438..798836236 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java @@ -147,7 +147,8 @@ public class StepperAttributeUtil { * @param fullQualifiedId The full qualified id for this step. * @param data The data. * @param value The new value. - * @param share If <code>true</code>, the value is also stored without the full qualified id. + * @param share When <code>true</code>, the value is also stored within the parent full + * qualified id to share the value with other steps within the same parent (group). * @return <code>true</code> if the value was set. */ public final static boolean setProperty(String key, IFullQualifiedId fullQualifiedId, IPropertiesContainer data, Object value, boolean share) { @@ -181,7 +182,8 @@ public class StepperAttributeUtil { * @param fullQualifiedId The full qualified id for this step. * @param data The data. * @param value The new boolean value. - * @param share If <code>true</code>, the value is also stored without the full qualified id. + * @param share When <code>true</code>, the value is also stored within the parent full + * qualified id to share the value with other steps within the same parent (group). * @return <code>true</code> if the value was set. */ public final static boolean setProperty(String key, IFullQualifiedId fullQualifiedId, IPropertiesContainer data, boolean value, boolean share) { @@ -189,7 +191,7 @@ public class StepperAttributeUtil { Assert.isNotNull(data); if (share && fullQualifiedId != null) { - data.setProperty(getFullQualifiedKey(key, null, data), value); + data.setProperty(getFullQualifiedKey(key, fullQualifiedId.getParentId(), data), value); } return data.setProperty(getFullQualifiedKey(key, fullQualifiedId, data), value); } @@ -215,7 +217,8 @@ public class StepperAttributeUtil { * @param fullQualifiedId The full qualified id for this step. * @param data The data. * @param value The new int value. - * @param share If <code>true</code>, the value is also stored without the full qualified id. + * @param share When <code>true</code>, the value is also stored within the parent full + * qualified id to share the value with other steps within the same parent (group). * @return <code>true</code> if the value was set. */ public final static boolean setProperty(String key, IFullQualifiedId fullQualifiedId, IPropertiesContainer data, int value, boolean share) { @@ -223,7 +226,7 @@ public class StepperAttributeUtil { Assert.isNotNull(data); if (share && fullQualifiedId != null) { - data.setProperty(getFullQualifiedKey(key, null, data), value); + data.setProperty(getFullQualifiedKey(key, fullQualifiedId.getParentId(), data), value); } return data.setProperty(getFullQualifiedKey(key, fullQualifiedId, data), value); } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java index 2abfb226f..1e403d8bf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java @@ -10,9 +10,7 @@ package org.eclipse.tcf.te.runtime.stepper.utils; -import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Platform; import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; import org.eclipse.tcf.te.runtime.persistence.utils.DataHelper; @@ -55,7 +53,6 @@ public final class StepperHelper { } if (stepGroupId != null && stepContext != null) { - scheduleStepperJob(stepContext, stepGroupId, name, histData, isCancelable, callback, monitor); StepperJob job = new StepperJob(name != null ? name : "", //$NON-NLS-1$ stepContext, data, @@ -74,33 +71,4 @@ public final class StepperHelper { } } - - public static final void scheduleStepperJob(Object context, String stepGroupId, String jobName, IPropertiesContainer data, boolean isCancelable, ICallback callback, IProgressMonitor monitor) { - IStepContext stepContext = null; - if (context instanceof IStepContext) { - stepContext = (IStepContext)context; - } - else if (context instanceof IAdaptable) { - stepContext = (IStepContext)((IAdaptable)context).getAdapter(IStepContext.class); - } - if (stepContext == null && context != null) { - stepContext = (IStepContext)Platform.getAdapterManager().getAdapter(context, IStepContext.class); - } - - StepperJob job = new StepperJob(jobName != null ? jobName : "", //$NON-NLS-1$ - stepContext, - data, - stepGroupId, - stepGroupId, - isCancelable, - monitor == null); - job.setJobCallback(callback); - - if (monitor != null) { - job.run(monitor); - } - else { - job.schedule(); - } - } } 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 c0aaa661a..5adce2509 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> </extension> -<!-- Step contributions --> +<!-- Launch Step contributions --> <extension point="org.eclipse.tcf.te.runtime.stepper.steps"> <step id="org.eclipse.tcf.te.tcf.core.openChannelStep" @@ -35,65 +35,6 @@ 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.internal.launchValueAddStep" - class="org.eclipse.tcf.te.tcf.core.steps.internal.LaunchValueAddStep" - label="%LaunchValueAddStep.name"/> - <step - id="org.eclipse.tcf.te.tcf.core.internal.chainPeerStep" - class="org.eclipse.tcf.te.tcf.core.steps.internal.ChainPeerStep" - label="%ChainPeerStep.name"/> - <step - id="org.eclipse.tcf.te.tcf.core.internal.applyPathMapsStep" - class="org.eclipse.tcf.te.tcf.core.steps.internal.ApplyPathMapsStep" - label="%ApplyPatMapsStep.name"/> - <step - id="org.eclipse.tcf.te.tcf.core.internal.closeChannelStep" - class="org.eclipse.tcf.te.tcf.core.steps.internal.CloseChannelStep" - label="%CloseChannelStep.name"/> - <step - id="org.eclipse.tcf.te.tcf.core.internal.shutdownValueAddsStepGroup" - class="org.eclipse.tcf.te.tcf.core.steps.internal.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"> - <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"/> - </references> - </stepGroup> - <stepGroup id="org.eclipse.tcf.te.tcf.core.internal.launchValueAddsStepGroup" - iterator="org.eclipse.tcf.te.tcf.core.iterators.ValueAddsIterator"> - <references> - <reference id="org.eclipse.tcf.te.tcf.core.internal.launchValueAddStep"/> - </references> - </stepGroup> - <stepGroup id="org.eclipse.tcf.te.tcf.core.internal.chainPeersStepGroup" - iterator="org.eclipse.tcf.te.tcf.core.iterators.ChainPeersIterator"> - <references> - <reference id="org.eclipse.tcf.te.tcf.core.internal.chainPeerStep"/> - </references> - </stepGroup> - - - <stepGroup id="org.eclipse.tcf.te.tcf.core.closeChannelStepGroup"> - <references> - <reference id="org.eclipse.tcf.te.tcf.core.internal.closeChannelStep"/> - <reference id="org.eclipse.tcf.te.tcf.core.shutdownValueAddsStepGroup"/> - </references> - </stepGroup> - <stepGroup id="org.eclipse.tcf.te.tcf.core.internal.shutdownValueAddsStepGroup" - iterator="org.eclipse.tcf.te.tcf.core.iterators.ValueAddsIterator"> - <references> - <reference id="org.eclipse.tcf.te.tcf.core.internal.shutdownValueAddStep"/> - </references> - </stepGroup> - </extension> - </plugin> diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java index 5258a52bf..86a2ae520 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java @@ -21,18 +21,12 @@ public interface ITcfStepAttributes { public static final String ATTR_PREFIX = "org.eclipse.tcf.te.tcf.locator"; //$NON-NLS-1$ /** - * Step attribute: The TCF channel. + * Launch configuration attribute: The TCF channel. */ public static final String ATTR_CHANNEL = ITcfStepAttributes.ATTR_PREFIX + ".channel"; //$NON-NLS-1$ /** - * Step attribute: The token for a running TCF command. + * Launch configuration attribute: The token for a running TCF command. */ public static final String ATTR_RUNNING_TOKEN = ITcfStepAttributes.ATTR_PREFIX + ".running_token"; //$NON-NLS-1$ - - /** - * Step attribute: The value add. - */ - public static final String ATTR_VALUE_ADD = ITcfStepAttributes.ATTR_PREFIX + ".value_add"; //$NON-NLS-1$ - } 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 deleted file mode 100644 index 6355634e4..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ChainPeersIterator.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * 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.iterators; - -import java.util.ArrayList; -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.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.IStepAttributes; -import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext; -import org.eclipse.tcf.te.tcf.core.interfaces.IPeerProperties; -import org.eclipse.tcf.te.tcf.core.util.persistence.PeerDataHelper; -import org.eclipse.tcf.te.tcf.core.va.ValueAddManager; -import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd; - -/** - * ChainPeersIterator - */ -public class ChainPeersIterator extends AbstractPeerStepGroupIterator { - - private final List<IPeer> peers = new ArrayList<IPeer>(); - - /** - * Constructor. - */ - public ChainPeersIterator() { - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.iterators.AbstractStepGroupIterator#initialize(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 initialize(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { - super.initialize(context, data, fullQualifiedId, monitor); - - 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); - } - } - - String proxyConfiguration = peer.getAttributes().get(IPeerProperties.PROP_PROXIES); - IPeer[] proxies = proxyConfiguration != null ? PeerDataHelper.decodePeerList(proxyConfiguration) : null; - - for (IPeer proxy : proxies) { - peers.add(proxy); - } - peers.add(peer); - - setIterations(peers.size()); - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.iterators.AbstractStepGroupIterator#internalNext(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 internalNext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { - StepperAttributeUtil.setProperty(IStepAttributes.ATTR_ACTIVE_CONTEXT, fullQualifiedId, data, peers.get(getIteration())); - } -} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ValueAddsIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ValueAddsIterator.java deleted file mode 100644 index 066264b4d..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/ValueAddsIterator.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * 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.iterators; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -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.interfaces.steps.ITcfStepAttributes; -import org.eclipse.tcf.te.tcf.core.va.ValueAddManager; -import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd; - -/** - * ValueAddsIterator - */ -public class ValueAddsIterator extends AbstractPeerStepGroupIterator { - - private IValueAdd[] valueAdds = null; - - /** - * Constructor. - */ - public ValueAddsIterator() { - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.iterators.AbstractStepGroupIterator#initialize(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 initialize(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { - super.initialize(context, data, fullQualifiedId, monitor); - - valueAdds = ValueAddManager.getInstance().getValueAdd(getActivePeerContext(context, data, fullQualifiedId)); - - setIterations(valueAdds != null ? valueAdds.length : 0); - - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.iterators.AbstractStepGroupIterator#internalNext(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 internalNext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { - StepperAttributeUtil.setProperty(ITcfStepAttributes.ATTR_VALUE_ADD, fullQualifiedId, data, valueAdds[getIteration()]); - } - -} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java index c33878b5c..0aa87b5cd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java @@ -48,6 +48,6 @@ public class CloseChannelStep extends AbstractPeerStep { if (channel != null && channel.getState() != IChannel.STATE_CLOSED) { Tcf.getChannelManager().closeChannel(channel); } - callback(data, fullQualifiedId, callback, Status.OK_STATUS, null); + callback.done(this, Status.OK_STATUS); } } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java index 7c07759ce..bc90bcba7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java @@ -51,7 +51,7 @@ public class OpenChannelStep extends AbstractPeerStep { @Override public void doneOpenChannel(final Throwable error, final IChannel channel) { StepperAttributeUtil.setProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId.getParentId(), data, channel); - callback(data, fullQualifiedId, callback, StatusHelper.getStatus(error), null); + callback.done(OpenChannelStep.this, StatusHelper.getStatus(error)); } }); } 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..03eaa4e1a 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 @@ -48,6 +48,6 @@ public class ShutDownStep extends AbstractPeerStep { Tcf.getChannelManager().shutdown(getActivePeerContext(context, data, fullQualifiedId)); } }); - callback(data, fullQualifiedId, callback, Status.OK_STATUS, null); + callback.done(this, Status.OK_STATUS); } } 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/steps/internal/ApplyPathMapsStep.java deleted file mode 100644 index 93af0ed0b..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ApplyPathMapsStep.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * 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.internal; - -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.IChannel; -import org.eclipse.tcf.protocol.IPeer; -import org.eclipse.tcf.services.IPathMap; -import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; -import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; -import org.eclipse.tcf.te.runtime.services.ServiceManager; -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.activator.CoreBundleActivator; -import org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService; -import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes; -import org.eclipse.tcf.te.tcf.core.steps.AbstractPeerStep; - -/** - * ApplyPathMapsStep - */ -public class ApplyPathMapsStep extends AbstractPeerStep { - - /** - * Constructor. - */ - public ApplyPathMapsStep() { - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#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 { - IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data); - if (channel == null || channel.getState() != IChannel.STATE_OPEN) { - throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "missing TCF channel")); //$NON-NLS-1$ - } - } - - /* (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(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, final ICallback callback) { - final IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data); - final IPeer peer = getActivePeerContext(context, data, fullQualifiedId); - final IPathMapService service = ServiceManager.getInstance().getService(peer, IPathMapService.class); - final IPathMap svc = channel.getRemoteService(IPathMap.class); - if (service != null && svc != null) { - // Apply the initial path map to the opened channel. - // This must happen outside the TCF dispatch thread as it may trigger - // the launch configuration change listeners. - Thread thread = new Thread(new Runnable() { - @Override - public void run() { - service.applyPathMap(peer, true, callback); - } - }); - thread.start(); - } else { - 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/internal/ChainPeerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ChainPeerStep.java deleted file mode 100644 index 2b03e5294..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ChainPeerStep.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * 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.internal; - -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.IChannel; -import org.eclipse.tcf.protocol.IPeer; -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.runtime.utils.StatusHelper; -import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes; -import org.eclipse.tcf.te.tcf.core.steps.AbstractPeerStep; - -/** - * ChainPeerStep - */ -public class ChainPeerStep extends AbstractPeerStep { - - /** - * Constructor. - */ - public ChainPeerStep() { - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#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 { - } - - /* (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(IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, final ICallback callback) { - IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data); - final IPeer peer = getActivePeerContext(context, data, fullQualifiedId); - - if (channel == null) { - channel = peer.openChannel(); - } - else { - channel.redirect(peer.getAttributes()); - } - - final IChannel finChannel = channel; - channel.addChannelListener(new IChannel.IChannelListener() { - @Override - public void onChannelOpened() { - finChannel.removeChannelListener(this); - StepperAttributeUtil.setProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data, finChannel, true); - callback(data, fullQualifiedId, callback, Status.OK_STATUS, null); - } - - @Override - public void onChannelClosed(Throwable error) { - // Remove ourself as listener from the channel - finChannel.removeChannelListener(this); - callback(data, fullQualifiedId, callback, StatusHelper.getStatus(error), null); - } - - @Override - public void congestionLevel(int level) { - } - }); - } - - /* (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) { - IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data); - - if (channel != null && channel.getState() != IChannel.STATE_CLOSED) { - channel.close(); - } - - super.rollback(context, data, status, fullQualifiedId, monitor, callback); - } -} 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/steps/internal/CloseChannelStep.java deleted file mode 100644 index 715bcc8f8..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/CloseChannelStep.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * 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.internal; - -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.interfaces.steps.ITcfStepAttributes; -import org.eclipse.tcf.te.tcf.core.steps.AbstractPeerStep; - -/** - * Close channel step implementation. - */ -public class CloseChannelStep extends AbstractPeerStep { - - /** - * Constructor. - */ - public CloseChannelStep() { - } - - /* (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 { - } - - /* (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(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) { - IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data); - if (channel != null && channel.getState() != IChannel.STATE_CLOSED) { - channel.close(); - } - 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/internal/LaunchValueAddStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/LaunchValueAddStep.java deleted file mode 100644 index 593153476..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/LaunchValueAddStep.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * 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.internal; - -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.te.runtime.callback.Callback; -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.activator.CoreBundleActivator; -import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes; -import org.eclipse.tcf.te.tcf.core.steps.AbstractPeerStep; -import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd; - -/** - * LaunchValueAddStep - */ -public class LaunchValueAddStep extends AbstractPeerStep { - - /** - * Constructor. - */ - public LaunchValueAddStep() { - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#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 { - 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$ - } - } - - /* (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(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() { - @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); - } - } - }); - } - - /* (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) { - final IValueAdd valueAdd = (IValueAdd)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_VALUE_ADD, fullQualifiedId, data); - final String peerId = getActivePeerContext(context, data, fullQualifiedId).getID(); - - valueAdd.shutdown(peerId, callback); - - super.rollback(context, data, status, fullQualifiedId, monitor, callback); - } -} 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/steps/internal/ShutdownValueAddStep.java deleted file mode 100644 index c333ed43c..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/internal/ShutdownValueAddStep.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * 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.internal; - -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.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.activator.CoreBundleActivator; -import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes; -import org.eclipse.tcf.te.tcf.core.steps.AbstractPeerStep; -import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd; - -/** - * ShutdownValueAddStep - */ -public class ShutdownValueAddStep extends AbstractPeerStep { - - /** - * Constructor. - */ - public ShutdownValueAddStep() { - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#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 { - 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$ - } - } - - /* (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(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.shutdown(peerId, callback); - } -} 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 b6ddf7a2a..7fb76c053 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 @@ -23,7 +23,6 @@ adaptableType="org.eclipse.tcf.protocol.IPeer" class="org.eclipse.tcf.te.tcf.locator.internal.adapters.AdapterFactory"> <adapter type="org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableURIProvider"/> - <adapter type="org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext"/> <adapter type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode"/> </factory> <factory diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java index 1b1f89d46..2a93510ad 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java @@ -107,9 +107,6 @@ public class AdapterFactory implements IAdapterFactory { } } if (IStepContext.class.equals(adapterType)) { - if (adaptableObject instanceof IPeer) { - return new PeerStepContext((IPeer)adaptableObject); - } if (adaptableObject instanceof IPeerNode) { return new PeerNodeStepContext((IPeerNode)adaptableObject); } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerStepContext.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerStepContext.java deleted file mode 100644 index 00dc08dae..000000000 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerStepContext.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * 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.locator.internal.adapters; - -import org.eclipse.tcf.protocol.IPeer; -import org.eclipse.tcf.te.runtime.stepper.context.AbstractStepContext; - -/** - * Peer step context implementation. - */ -public class PeerStepContext extends AbstractStepContext { - - /** - * Constructor - */ - public PeerStepContext(IPeer peer) { - super(peer); - } - - /** - * Returns the peer. - * @return The peer. - */ - public IPeer getPeer() { - return (IPeer)getContextObject(); - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext#getId() - */ - @Override - public String getId() { - return getPeer().getID(); - } - - /* (non-Javadoc) - * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext#getName() - */ - @Override - public String getName() { - return getPeer().getName(); - } - - /* (non-Javadoc) - * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class) - */ - @Override - public Object getAdapter(final Class adapter) { - if (IPeer.class.equals(adapter)) { - return getPeer(); - } - - return super.getAdapter(adapter); - } -} |