Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelLookupService.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelQueryService.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelRefreshService.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetWaitForReadyStep.java80
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/PeersByCurrentUserFilter.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RenameHandler.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/EditorSaveAsAdapter.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java86
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/dnd/CommonDnD.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java2
32 files changed, 89 insertions, 301 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
index 49b36bc30..29ed9062b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
@@ -101,7 +101,7 @@ public class TargetSelectionPage extends AbstractValidatingWizardPage {
// Refresh the information of remote services.
IPeerModel model = Model.getModel();
Assert.isNotNull(model);
- IPeerNode[] peers = model.getPeers();
+ IPeerNode[] peers = model.getPeerNodes();
if (peers != null) {
IPeerModelQueryService service = model.getService(IPeerModelQueryService.class);
for (IPeerNode peer : peers) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
index 2a7a67295..ae021d7b4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
@@ -18,7 +18,6 @@ StartSimulatorStep.name=Start Simulator
StopSimulatorStep.name=Stop Simulator
StartDebuggerStep.name=Start Debugger
StopDebuggerStep.name=Stop Debugger
-SetWaitForReadyStep.name=Set peer waiting state
WaitForReadyStep.name=Wait until peer becomes ready
SignalPeerDisconnectedStep.name=Signal peer disconnected state
SetAsDefaultContextStep.name=Set peer as default context
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 71ce90d21..dc7703c96 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
@@ -174,10 +174,6 @@
class="org.eclipse.tcf.te.tcf.locator.steps.StopDebuggerStep"
label="%StopDebuggerStep.name"/>
<step
- id="org.eclipse.tcf.te.tcf.locator.setWaitForReadyStep"
- class="org.eclipse.tcf.te.tcf.locator.steps.SetWaitForReadyStep"
- label="%SetWaitForReadyStep.name"/>
- <step
id="org.eclipse.tcf.te.tcf.locator.waitForReadyStep"
class="org.eclipse.tcf.te.tcf.locator.steps.WaitForReadyStep"
label="%WaitForReadyStep.name"/>
@@ -209,7 +205,6 @@
<parameter name="stateOnCancel" value="disconnected" />
<parameter name="stateOnError" value="disconnected" />
</reference>
- <reference id="org.eclipse.tcf.te.tcf.locator.setWaitForReadyStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.startSimulatorStepGroup"/>
<reference id="org.eclipse.tcf.te.tcf.locator.waitForReadyStepGroup"/>
<reference id="org.eclipse.tcf.te.tcf.locator.setAsDefaultContextStep"/>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java
index a0adeaa52..a1ca4425b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java
@@ -98,7 +98,7 @@ public class Scanner extends Job implements IScanner {
if (monitor == null) monitor = new NullProgressMonitor();
// Get the current list of peers known to the parent model
- IPeerNode[] peers = getParentModel().getPeers();
+ IPeerNode[] peers = getParentModel().getPeerNodes();
// Do we have something to scan at all
if (peers.length > 0) {
try {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
index 926d67494..829906bd4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.locator;
-import java.net.ConnectException;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
@@ -192,12 +191,7 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
// Turn off change notifications temporarily
final boolean changed = peerNode.setChangeEventsEnabled(false);
- // Set the peer state property
- int counter = peerNode.getIntProperty(IPeerNodeProperties.PROP_CHANNEL_REF_COUNTER);
- if (!peerNode.isProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_WAITING_FOR_READY)) {
- peerNode.setProperty(IPeerNodeProperties.PROP_STATE, counter > 0 ? IPeerNodeProperties.STATE_CONNECTED : IPeerNodeProperties.STATE_REACHABLE);
- peerNode.setProperty(IPeerNodeProperties.PROP_LAST_SCANNER_ERROR, null);
- }
+ peerNode.setProperty(IPeerNodeProperties.PROP_LAST_SCANNER_ERROR, null);
// Get the parent model from the model mode
final IPeerModel model = (IPeerModel)peerNode.getAdapter(IPeerModel.class);
@@ -491,11 +485,7 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
boolean changed = peerNode.setChangeEventsEnabled(false);
peerNode.setProperty(IPeerNodeProperties.PROP_CHANNEL_REF_COUNTER, null);
- if (!peerNode.isProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_WAITING_FOR_READY)) {
- boolean timeout = error instanceof SocketTimeoutException || (error instanceof ConnectException && error.getMessage() != null && error.getMessage().startsWith("Connection timed out:")); //$NON-NLS-1$
- peerNode.setProperty(IPeerNodeProperties.PROP_STATE, timeout ? IPeerNodeProperties.STATE_NOT_REACHABLE : IPeerNodeProperties.STATE_ERROR);
- peerNode.setProperty(IPeerNodeProperties.PROP_LAST_SCANNER_ERROR, error instanceof SocketTimeoutException ? null : error);
- }
+ peerNode.setProperty(IPeerNodeProperties.PROP_LAST_SCANNER_ERROR, error instanceof SocketTimeoutException ? null : error);
// Clear out previously determined services
IPeerModel model = (IPeerModel)peerNode.getAdapter(IPeerModel.class);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
index 832f225e7..daf6d8218 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
@@ -75,7 +75,7 @@ public interface IPeerModel extends IAdaptable {
*
* @return The list of known peers or an empty list.
*/
- public IPeerNode[] getPeers();
+ public IPeerNode[] getPeerNodes();
/**
* Returns an unmodifiable list of known children for the given parent peer.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java
index 3e5491003..edf04d621 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java
@@ -44,41 +44,6 @@ public interface IPeerNodeProperties {
public static final String PROP_REDIRECT_PROXY = "redirect.proxy"; //$NON-NLS-1$
/**
- * Property: The peer state.
- */
- public static final String PROP_STATE = "state"; //$NON-NLS-1$
-
- /**
- * Peer state: Not determined yet (unknown).
- */
- public static final int STATE_UNKNOWN = -1;
-
- /**
- * Peer state: Peer is reachable, no active communication channel is open.
- */
- public static final int STATE_REACHABLE = 0;
-
- /**
- * Peer state: Peer is reachable and an active communication channel is opened.
- */
- public static final int STATE_CONNECTED = 1;
-
- /**
- * Peer state: Peer is not reachable. Connection attempt timed out.
- */
- public static final int STATE_NOT_REACHABLE = 2;
-
- /**
- * Peer state: Peer is not reachable. Connection attempt terminated with error.
- */
- public static final int STATE_ERROR = 3;
-
- /**
- * Peer state: Peer is waiting to become ready.
- */
- public static final int STATE_WAITING_FOR_READY = 4;
-
- /**
* Property: Reference counter tracking the active channels for this peer.
*/
public static String PROP_CHANNEL_REF_COUNTER = "channelRefCounter.silent"; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java
index 6a06ca132..599383404 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java
@@ -64,7 +64,6 @@ public class ChannelStateChangeListener implements IChannelStateChangeListener {
if (counter < 0) counter = 0;
counter++;
node.setProperty(IPeerNodeProperties.PROP_CHANNEL_REF_COUNTER, counter);
- if (counter > 0) node.setProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_CONNECTED);
}
}
break;
@@ -79,9 +78,6 @@ public class ChannelStateChangeListener implements IChannelStateChangeListener {
counter--;
if (counter < 0) counter = 0;
node.setProperty(IPeerNodeProperties.PROP_CHANNEL_REF_COUNTER, counter);
- if (counter == 0 && node.isProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_CONNECTED)) {
- node.setProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_REACHABLE);
- }
}
}
break;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
index 27ba6659f..81c31c723 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
@@ -115,7 +115,7 @@ public final class LocatorListener implements ILocator.LocatorListener {
// static peers with unknown link state, refresh the agent ID's first.
List<IPeerNode> nodes = new ArrayList<IPeerNode>();
- for (IPeerNode node : model.getPeers()) {
+ for (IPeerNode node : model.getPeerNodes()) {
// We expect the agent ID to be set
if (node.getPeer().getAgentID() == null || "".equals(node.getPeer().getAgentID())) { //$NON-NLS-1$
nodes.add(node);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java
index 19d9e40af..594031ffd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java
@@ -189,7 +189,7 @@ public class PeerModel extends PlatformObject implements IPeerModel {
* @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getPeers()
*/
@Override
- public IPeerNode[] getPeers() {
+ public IPeerNode[] getPeerNodes() {
final AtomicReference<IPeerNode[]> result = new AtomicReference<IPeerNode[]>();
Runnable runnable = new Runnable() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelLookupService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelLookupService.java
index b21e4f898..2dbca2eef 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelLookupService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelLookupService.java
@@ -44,7 +44,7 @@ public class PeerModelLookupService extends AbstractPeerModelService implements
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
IPeerNode node = null;
- for (IPeerNode candidate : getPeerModel().getPeers()) {
+ for (IPeerNode candidate : getPeerModel().getPeerNodes()) {
IPeer peer = candidate.getPeer();
if (id.equals(peer.getID())) {
node = candidate;
@@ -93,7 +93,7 @@ public class PeerModelLookupService extends AbstractPeerModelService implements
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
List<IPeerNode> nodes = new ArrayList<IPeerNode>();
- for (IPeerNode candidate : getPeerModel().getPeers()) {
+ for (IPeerNode candidate : getPeerModel().getPeerNodes()) {
IPeer peer = candidate.getPeer();
if (agentId.equals(peer.getAgentID())) {
nodes.add(candidate);
@@ -132,7 +132,7 @@ public class PeerModelLookupService extends AbstractPeerModelService implements
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
List<IPeerNode> nodes = new ArrayList<IPeerNode>();
- for (IPeerNode candidate : getPeerModel().getPeers()) {
+ for (IPeerNode candidate : getPeerModel().getPeerNodes()) {
IPeer peer = candidate.getPeer();
if (name.equals(peer.getName())) {
nodes.add(candidate);
@@ -153,7 +153,7 @@ public class PeerModelLookupService extends AbstractPeerModelService implements
IPeerModelQueryService queryService = model.getService(IPeerModelQueryService.class);
List<IPeerNode> nodes = new ArrayList<IPeerNode>();
- for (IPeerNode candidate : model.getPeers()) {
+ for (IPeerNode candidate : model.getPeerNodes()) {
String services = queryService.queryLocalServices(candidate);
boolean matchesExpectations = true;
@@ -216,7 +216,7 @@ public class PeerModelLookupService extends AbstractPeerModelService implements
List<IPeerNode> nodes = new ArrayList<IPeerNode>();
if (peer != null) {
- for (IPeerNode candidate : getPeerModel().getPeers()) {
+ for (IPeerNode candidate : getPeerModel().getPeerNodes()) {
// If the agent id is available, match up the agent id first.
if (candidate.getPeer().getAgentID() != null && candidate.getPeer().getAgentID().equals(peer.getAgentID())) {
nodes.add(candidate);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelQueryService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelQueryService.java
index 51f3cd282..3e5cda423 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelQueryService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelQueryService.java
@@ -204,8 +204,7 @@ public class PeerModelQueryService extends AbstractPeerModelService implements I
};
// Do not try to open a channel to peers known to be unreachable
- int state = node.getIntProperty(IPeerNodeProperties.PROP_STATE);
- if (state == IPeerNodeProperties.STATE_ERROR || state == IPeerNodeProperties.STATE_NOT_REACHABLE || !node.isComplete()) {
+ if (!node.isComplete()) {
innerDone.doneQueryServices(null);
return;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelRefreshService.java
index ba31a6891..9c6c75306 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelRefreshService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/PeerModelRefreshService.java
@@ -111,7 +111,7 @@ public class PeerModelRefreshService extends AbstractPeerModelService implements
}
// Get the list of old children (update node instances where possible)
- final List<IPeerNode> oldChildren = new ArrayList<IPeerNode>(Arrays.asList(model.getPeers()));
+ final List<IPeerNode> oldChildren = new ArrayList<IPeerNode>(Arrays.asList(model.getPeerNodes()));
// Refresh the static peer definitions
refreshStaticPeers(oldChildren, model);
@@ -182,7 +182,7 @@ public class PeerModelRefreshService extends AbstractPeerModelService implements
// there exist an dynamically discovered node with a different id but
// for the same peer. Do this check only if the peer to add is a static one.
IPeerNode toRemove = null;
- for (IPeerNode candidate : model.getPeers()) {
+ for (IPeerNode candidate : model.getPeerNodes()) {
if (candidate.equals(peerNode))continue;
String peerID = peerNode.getPeerId();
String clientID = candidate.getPeer().getAttributes().get("ClientID"); //$NON-NLS-1$
@@ -272,7 +272,7 @@ public class PeerModelRefreshService extends AbstractPeerModelService implements
}
// Get the list of old children (update node instances where possible)
- final List<IPeerNode> oldChildren = new ArrayList<IPeerNode>(Arrays.asList(model.getPeers()));
+ final List<IPeerNode> oldChildren = new ArrayList<IPeerNode>(Arrays.asList(model.getPeerNodes()));
// Refresh the static peer definitions
refreshStaticPeers(oldChildren, model);
@@ -516,7 +516,7 @@ public class PeerModelRefreshService extends AbstractPeerModelService implements
}, new CallbackInvocationDelegate());
// Make a copy of the current list of static peers before processing
- List<IPeerNode> nodesToProcess = new ArrayList<IPeerNode>(Arrays.asList(nodes != null ? nodes : model.getPeers()));
+ List<IPeerNode> nodesToProcess = new ArrayList<IPeerNode>(Arrays.asList(nodes != null ? nodes : model.getPeerNodes()));
// Loop the list of static peers and try to get the agent ID
for (IPeerNode node : nodesToProcess) {
// If not static or not complete --> ignore
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetWaitForReadyStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetWaitForReadyStep.java
deleted file mode 100644
index 369a2b4e1..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetWaitForReadyStep.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tcf.te.tcf.locator.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.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProperties;
-
-/**
- * Set the waiting_for_ready state.
- */
-public class SetWaitForReadyStep extends AbstractPeerNodeStep {
-
- /**
- * Constructor.
- */
- public SetWaitForReadyStep() {
- }
-
- /* (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(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, final IProgressMonitor monitor, final ICallback callback) {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- int state = getActivePeerModelContext(context, data, fullQualifiedId).getIntProperty(IPeerNodeProperties.PROP_STATE);
- if (state == IPeerNodeProperties.STATE_UNKNOWN || state == IPeerNodeProperties.STATE_NOT_REACHABLE || state == IPeerNodeProperties.STATE_ERROR) {
- getActivePeerModelContext(context, data, fullQualifiedId).setProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_WAITING_FOR_READY);
- }
- }
- });
- callback.done(this, Status.OK_STATUS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.steps.AbstractStep#getTotalWork(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public int getTotalWork(IStepContext context, IPropertiesContainer data) {
- return 100;
- }
-
- /* (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(final IStepContext context, final IPropertiesContainer data, IStatus status, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- getActivePeerModelContext(context, data, fullQualifiedId).setProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_NOT_REACHABLE);
- }
- });
- super.rollback(context, data, status, fullQualifiedId, monitor, callback);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
index 76964c178..9014443ac 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.tcf.te.tcf.ui.console;bundle-version="1.2.0",
org.eclipse.tcf.te.ui;bundle-version="1.2.0",
org.eclipse.tcf.te.ui.swt;bundle-version="1.2.0",
- org.eclipse.tcf.te.ui.views;bundle-version="1.2.0"
+ org.eclipse.tcf.te.ui.views;bundle-version="1.2.0",
+ org.eclipse.tcf.te.core;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java
index 436c22425..63fcb819f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java
@@ -63,7 +63,7 @@ public class PeersSubMenuAction extends Action implements IMenuCreator, IViewAct
public void locatorModelChanged(IPeerModel model, IPeerNode peer, boolean added) {
// Re-evaluate the enablement
if (actionProxy != null) {
- final IPeerNode[] peers = Model.getModel().getPeers();
+ final IPeerNode[] peers = Model.getModel().getPeerNodes();
actionProxy.setEnabled(peers != null && peers.length > 0);
// If the peer is not set to the view yet, but the action get's
@@ -119,7 +119,7 @@ public class PeersSubMenuAction extends Action implements IMenuCreator, IViewAct
// Determine the enablement. The action is disabled
// if no peers are available.
- IPeerNode[] peers = Model.getModel().getPeers();
+ IPeerNode[] peers = Model.getModel().getPeerNodes();
if (peers != null && peers.length > 0) {
action.setEnabled(true);
if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peers[0]);
@@ -209,18 +209,18 @@ public class PeersSubMenuAction extends Action implements IMenuCreator, IViewAct
boolean selectFirst = selected == null;
- IPeerNode[] peers = Model.getModel().getPeers();
- if (peers != null && peers.length > 0) {
- for (IPeerNode peer : peers) {
- if (isValueAdd(peer)) continue;
- Action action = new PeerAction(view, peer);
+ IPeerNode[] peerNodes = Model.getModel().getPeerNodes();
+ if (peerNodes != null && peerNodes.length > 0) {
+ for (IPeerNode peerNode : peerNodes) {
+ if (isValueAdd(peerNode)) continue;
+ Action action = new PeerAction(view, peerNode);
if (selectFirst) {
action.setChecked(true);
selectFirst = false;
- if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peer);
- } else if (selected != null && selected.equals(peer)) {
+ if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peerNode);
+ } else if (selected != null && selected.equals(peerNode)) {
action.setChecked(true);
- if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peer);
+ if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peerNode);
}
item = new ActionContributionItem(action);
item.fill(m, -1);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
index 3d4aad89d..fdf232507 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
@@ -17,7 +17,6 @@ navigatorContent.name = Dynamic Target Discovery
# ***** Filter *****
-UnreachablePeersFilter.name=Unreachable targets
RedirectPeersFilter.name=Redirected Targets (Root Level)
PeersByCurrentUserFilter.name=Only show targets started by me
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
index 242b3669d..9fd60e0a4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
@@ -148,13 +148,6 @@
</dropAssistant>
</navigatorContent>
<commonFilter
- activeByDefault="false"
- class="org.eclipse.tcf.te.tcf.ui.filter.UnreachablePeersFilter"
- id="org.eclipse.tcf.te.tcf.ui.navigator.UnreachablePeersFilter"
- name="%UnreachablePeersFilter.name"
- visibleInUI="true">
- </commonFilter>
- <commonFilter
activeByDefault="true"
class="org.eclipse.tcf.te.tcf.ui.filter.RedirectPeersFilter"
id="org.eclipse.tcf.te.tcf.ui.navigator.RedirectPeersFilter"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
index 3d06081ad..2384a51e3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
@@ -125,7 +125,7 @@ public class UIPlugin extends AbstractUIPlugin {
@Override
public void run() {
// Get all peer model objects
- IPeerNode[] peers = model.getPeers();
+ IPeerNode[] peers = model.getPeerNodes();
// Loop them and check if disconnect is available
for (IPeerNode peerNode : peers) {
IService[] services = ServiceManager.getInstance().getServices(peerNode, IStepperOperationService.class, false);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
index b13904a1f..fef9eca27 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
@@ -45,7 +45,6 @@ import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
import org.eclipse.tcf.te.tcf.ui.editor.controls.InfoSectionPeerNameControl;
import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
-import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
@@ -257,7 +256,6 @@ public class GeneralInformationSection extends AbstractSection {
public void run() {
// The section is handling the ID, the name and
// the link state. Ignore other properties.
- odc.setProperty(IPeerNodeProperties.PROP_STATE, node.getProperty(IPeerNodeProperties.PROP_STATE));
odc.setProperty(IPeer.ATTR_ID, node.getPeer().getAttributes().get(IPeer.ATTR_ID));
odc.setProperty(IPeer.ATTR_NAME, node.getPeer().getAttributes().get(IPeer.ATTR_NAME));
// Initially, the working copy is a duplicate of the original data copy
@@ -281,28 +279,6 @@ public class GeneralInformationSection extends AbstractSection {
nameControl.setEditFieldControlText(wc.getStringProperty(IPeer.ATTR_NAME));
}
- if (linkState != null && linkStateImage != null) {
- String state = wc.getStringProperty(IPeerNodeProperties.PROP_STATE);
- linkState.setText(Messages.getString("GeneralInformationSection_state_" + (state != null ? state.replace('-', '_') : "_1"))); //$NON-NLS-1$ //$NON-NLS-2$
-
- switch (wc.getIntProperty(IPeerNodeProperties.PROP_STATE)) {
- case 0:
- linkStateImage.setImage(UIPlugin.getImage(ImageConsts.GOLD_OVR));
- break;
- case 1:
- linkStateImage.setImage(UIPlugin.getImage(ImageConsts.GREEN_OVR));
- break;
- case 2:
- linkStateImage.setImage(UIPlugin.getImage(ImageConsts.RED_OVR));
- break;
- case 3:
- linkStateImage.setImage(UIPlugin.getImage(ImageConsts.RED_X_OVR));
- break;
- default:
- linkStateImage.setImage(UIPlugin.getImage(ImageConsts.GREY_OVR));
- }
- }
-
// Mark the control update as completed now
setIsUpdating(false);
}
@@ -480,7 +456,7 @@ public class GeneralInformationSection extends AbstractSection {
@Override
public void run() {
// Get all peer model objects
- IPeerNode[] peers = Model.getModel().getPeers();
+ IPeerNode[] peers = Model.getModel().getPeerNodes();
// Loop them and find the ones which are of our handled types
for (IPeerNode peerNode : peers) {
if (!peerNode.equals(od)) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java
index 42bc893a7..2fac8d4cb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TcpTransportSection.java
@@ -524,7 +524,6 @@ public class TcpTransportSection extends AbstractSection implements IDataExchang
node.setProperty(IPeerNodeProperties.PROP_INSTANCE, newPeer);
// As the transport changed, we have to reset the state back to "unknown"
// and clear out the services and DNS markers
- node.setProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_UNKNOWN);
node.setProperty("dns.name.transient", null); //$NON-NLS-1$
node.setProperty("dns.lastIP.transient", null); //$NON-NLS-1$
node.setProperty("dns.skip.transient", null); //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
index 9c89a206a..610537e35 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
@@ -468,7 +468,6 @@ public class TransportSection extends AbstractSection implements IDataExchangeNo
node.setProperty(IPeerNodeProperties.PROP_INSTANCE, newPeer);
// As the transport changed, we have to reset the state back to "unknown"
// and clear out the services and DNS markers
- node.setProperty(IPeerNodeProperties.PROP_STATE, IPeerNodeProperties.STATE_UNKNOWN);
node.setProperty("dns.name.transient", null); //$NON-NLS-1$
node.setProperty("dns.lastIP.transient", null); //$NON-NLS-1$
node.setProperty("dns.skip.transient", null); //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/PeersByCurrentUserFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/PeersByCurrentUserFilter.java
index 62e9b4204..1111805de 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/PeersByCurrentUserFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/PeersByCurrentUserFilter.java
@@ -14,8 +14,8 @@ import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
/**
* Filter implementation filtering peers not started by the current user.
@@ -28,14 +28,13 @@ public class PeersByCurrentUserFilter extends ViewerFilter {
*/
@Override
public boolean select(final Viewer viewer, final Object parentElement, final Object element) {
- if (element instanceof IPeerNode) {
+ if (element instanceof IPeer) {
final AtomicReference<String> user = new AtomicReference<String>();
Runnable runnable = new Runnable() {
@Override
public void run() {
- IPeerNode peerNode = (IPeerNode)element;
- user.set(peerNode.getPeer().getUserName());
+ user.set(((IPeer)element).getUserName());
}
};
Assert.isTrue(!Protocol.isDispatchThread());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
deleted file mode 100644
index d1f122400..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.ui.filter;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProperties;
-
-/**
- * Filter implementation filtering unreachable peers.
- */
-public class UnreachablePeersFilter extends ViewerFilter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
-
- // Filter only elements of simulator IPeerNode
- if (element instanceof IPeerNode) {
- final IPeerNode peerNode = (IPeerNode)element;
-
- // Determine the current action of the peer model
- final int[] state = new int[1];
- if (Protocol.isDispatchThread()) {
- state[0] = peerNode.getIntProperty(IPeerNodeProperties.PROP_STATE);
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- state[0] = peerNode.getIntProperty(IPeerNodeProperties.PROP_STATE);
- }
- });
- }
-
- return state[0] != IPeerNodeProperties.STATE_NOT_REACHABLE && state[0] != IPeerNodeProperties.STATE_ERROR;
- }
-
- return true;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RenameHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RenameHandler.java
index 3a7be0ccf..af5804276 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RenameHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RenameHandler.java
@@ -217,7 +217,7 @@ public class RenameHandler extends AbstractHandler {
IPeerModel model = Model.getModel();
Assert.isNotNull(model);
- IPeerNode[] peers = model.getPeers();
+ IPeerNode[] peers = model.getPeerNodes();
for (IPeerNode peer : peers) {
String name = peer.getPeer().getName();
Assert.isNotNull(name);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/EditorSaveAsAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/EditorSaveAsAdapter.java
index 849638109..385b24a0a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/EditorSaveAsAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/EditorSaveAsAdapter.java
@@ -150,7 +150,7 @@ public class EditorSaveAsAdapter implements IEditorSaveAsAdapter {
@Override
public void run() {
// Get all peer model objects
- IPeerNode[] peers = Model.getModel().getPeers();
+ IPeerNode[] peers = Model.getModel().getPeerNodes();
// Loop them and find the ones which are of our handled types
for (IPeerNode peerNode : peers) {
String name = peerNode.getPeer().getName();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java
index 4690431d8..ac6414ab4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java
@@ -105,10 +105,10 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
* @param peerNode The peer model node. Must not be <code>null</code>.
* @return <code>True</code> if the peer model node is a value-add, <code>false</code> otherwise.
*/
- /* default */ final boolean isValueAdd(IPeerNode peerNode) {
- Assert.isNotNull(peerNode);
+ /* default */ final boolean isValueAdd(IPeer peer) {
+ Assert.isNotNull(peer);
- String value = peerNode.getPeer().getAttributes().get("ValueAdd"); //$NON-NLS-1$
+ String value = peer.getAttributes().get("ValueAdd"); //$NON-NLS-1$
boolean isValueAdd = value != null && ("1".equals(value.trim()) || Boolean.parseBoolean(value.trim())); //$NON-NLS-1$
return isValueAdd;
@@ -123,16 +123,31 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
/* default */ final boolean isFiltered(IPeerNode peerNode) {
Assert.isNotNull(peerNode);
- boolean filtered = false;
- boolean hideValueAdds = CoreBundleActivator.getScopedPreferences().getBoolean(org.eclipse.tcf.te.tcf.locator.interfaces.preferences.IPreferenceKeys.PREF_HIDE_VALUEADDS);
+ boolean filtered = isFiltered(peerNode.getPeer());
- filtered |= isValueAdd(peerNode) && hideValueAdds;
- if (!showInvisible) {
+ if (!filtered && !showInvisible) {
filtered |= !peerNode.isVisible();
}
- filtered |= peerNode.getPeer().getName() != null
- && peerNode.getPeer().getName().endsWith("Command Server"); //$NON-NLS-1$
+ return filtered;
+ }
+
+ /**
+ * Determines if the given peer node is filtered from the view completely.
+ *
+ * @param peerNode The peer node. Must not be <code>null</code>.
+ * @return <code>True</code> if filtered, <code>false</code> otherwise.
+ */
+ /* default */ final boolean isFiltered(IPeer peer) {
+ Assert.isNotNull(peer);
+
+ boolean filtered = false;
+ boolean hideValueAdds = CoreBundleActivator.getScopedPreferences().getBoolean(org.eclipse.tcf.te.tcf.locator.interfaces.preferences.IPreferenceKeys.PREF_HIDE_VALUEADDS);
+
+ filtered |= isValueAdd(peer) && hideValueAdds;
+
+ filtered |= peer.getName() != null
+ && peer.getName().endsWith("Command Server"); //$NON-NLS-1$
return filtered;
}
@@ -171,11 +186,11 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
// If it is the locator model, get the peers
if (parentElement instanceof IPeerModel) {
final IPeerModel model = (IPeerModel)parentElement;
- final IPeerNode[] peers = model.getPeers();
- final List<IPeerNode> candidates = new ArrayList<IPeerNode>();
+ final IPeerNode[] peerNodes = model.getPeerNodes();
+ final List<Object> candidates = new ArrayList<Object>();
if (IUIConstants.ID_CAT_FAVORITES.equals(catID)) {
- for (IPeerNode peer : peers) {
+ for (IPeerNode peer : peerNodes) {
ICategorizable categorizable = (ICategorizable)peer.getAdapter(ICategorizable.class);
if (categorizable == null) {
categorizable = (ICategorizable)Platform.getAdapterManager().getAdapter(peer, ICategorizable.class);
@@ -189,7 +204,7 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
}
}
else if (IUIConstants.ID_CAT_MY_TARGETS.equals(catID)) {
- for (IPeerNode peer : peers) {
+ for (IPeerNode peer : peerNodes) {
// Check for filtered nodes (Value-add's and Proxies)
if (isFiltered(peer)) {
continue;
@@ -223,40 +238,35 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
}
}
else if (IUIConstants.ID_CAT_NEIGHBORHOOD.equals(catID)) {
-// for (IPeerNode peer : peers) {
-// // Check for filtered nodes (Value-add's and Proxies)
-// if (isFiltered(peer)) {
-// continue;
-// }
+// final AtomicReference<IPeer[]> peers = new AtomicReference<IPeer[]>(null);
//
-// ICategorizable categorizable = (ICategorizable)peer.getAdapter(ICategorizable.class);
-// if (categorizable == null) {
-// categorizable = (ICategorizable)Platform.getAdapterManager().getAdapter(peer, ICategorizable.class);
-// }
-// Assert.isNotNull(categorizable);
-//
-// boolean startedByCurrentUser = System.getProperty("user.name").equals(peer.getPeer().getUserName()); //$NON-NLS-1$
-// if (startedByCurrentUser) {
-// // If the "My Targets" category is not visible, ignore the startedByCurrentUser flag
-// if (myTargetsCat != null && !myTargetsCat.isEnabled()) {
-// startedByCurrentUser = false;
+// Protocol.invokeAndWait(new Runnable() {
+// @Override
+// public void run() {
+// // Get the locator service
+// ILocator locatorService = Protocol.getLocator();
+// if (locatorService != null) {
+// // Get the map of peers known to the locator service.
+// Map<String, IPeer> peerMap = locatorService.getPeers();
+// peers.set(peerMap.values().toArray(new IPeer[peerMap.size()]));
// }
// }
+// });
//
-// boolean isNeighborhood = Managers.getCategoryManager().belongsTo(catID, categorizable.getId());
-// if (!isNeighborhood && !isStatic && !startedByCurrentUser) {
-// // "Neighborhood" is always transient
-// Managers.getCategoryManager().addTransient(catID, categorizable.getId());
-// isNeighborhood = true;
+// for (IPeer peer : peers.get()) {
+// // Check for filtered nodes (Value-add's and Proxies)
+// if (isFiltered(peer)) {
+// continue;
// }
//
-// if (isNeighborhood && !candidates.contains(peer)) {
+//
+// if (!candidates.contains(peer)) {
// candidates.add(peer);
// }
// }
}
else if (catID != null) {
- for (IPeerNode peer : peers) {
+ for (IPeerNode peer : peerNodes) {
ICategorizable categorizable = (ICategorizable)peer.getAdapter(ICategorizable.class);
if (categorizable == null) {
categorizable = (ICategorizable)Platform.getAdapterManager().getAdapter(peer, ICategorizable.class);
@@ -271,7 +281,7 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
}
}
else {
- for (IPeerNode peer : peers) {
+ for (IPeerNode peer : peerNodes) {
// Check for filtered nodes (Value-add's and Proxies)
if (isFiltered(peer)) {
continue;
@@ -282,7 +292,7 @@ public class ContentProvider implements ICommonContentProvider, ITreePathContent
}
}
- children = candidates.toArray(new IPeerNode[candidates.size()]);
+ children = candidates.toArray(new Object[candidates.size()]);
}
// If it is a peer model itself, get the child peers
else if (parentElement instanceof IPeerNode) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/dnd/CommonDnD.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/dnd/CommonDnD.java
index 4a697b99f..3ff41dd16 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/dnd/CommonDnD.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/dnd/CommonDnD.java
@@ -380,7 +380,7 @@ public class CommonDnD {
@Override
public void run() {
// Get all peer model objects
- IPeerNode[] peers = Model.getModel().getPeers();
+ IPeerNode[] peers = Model.getModel().getPeerNodes();
// Loop them and find the ones which are of our handled types
for (IPeerNode peerNode : peers) {
String name = peerNode.getPeer().getName();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java
index bc3096301..cdf9845f8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java
@@ -310,7 +310,7 @@ public abstract class AbstractConfigWizardPage extends AbstractFormsWizardPage i
@Override
public void run() {
// Get all peer model objects
- IPeerNode[] peers = Model.getModel().getPeers();
+ IPeerNode[] peers = Model.getModel().getPeerNodes();
// Loop them and find the ones which are of our handled types
for (IPeerNode peerNode : peers) {
String name = peerNode.getPeer().getName();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
index 42583508c..d421fa1bf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
@@ -454,7 +454,7 @@ public class NewTargetWizardPage extends AbstractValidatingWizardPage implements
@Override
public void run() {
// Get all peer model objects
- IPeerNode[] peers = Model.getModel().getPeers();
+ IPeerNode[] peers = Model.getModel().getPeerNodes();
// Loop them and find the ones which are of our handled types
for (IPeerNode peerNode : peers) {
String name = peerNode.getPeer().getName();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
index 998465d72..abf4d7dd7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
@@ -142,7 +142,7 @@ public class PeerExportWizardPage extends WizardPage {
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof IPeerModel) {
- return ((IPeerModel)inputElement).getPeers();
+ return ((IPeerModel)inputElement).getPeerNodes();
}
return new Object[0];
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java
index 946c2d673..1c8401e59 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java
@@ -355,7 +355,7 @@ public class PeerImportWizardPage extends WizardPage {
public void run() {
peerNode.set(model.getService(IPeerModelLookupService.class).lkupPeerModelById(((IPeer)config).getID()));
if (peerNode.get() == null) {
- for (IPeerNode peer : model.getPeers()) {
+ for (IPeerNode peer : model.getPeerNodes()) {
String name = peer.getPeer().getName();
if (name.equalsIgnoreCase(((IPeer)config).getName())) {
peerNode.set(peer);

Back to the top