Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2013-12-13 05:24:12 -0500
committerTobias Schwarz2013-12-13 05:24:12 -0500
commit9c70311b440b7192b6af02fd9dd5fc806492b66a (patch)
tree0ba5297287c01bf74f8852f2f38565818a103998 /target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui
parent17e2516e95a40b95a6298c7e294b0cfc9088bbf4 (diff)
downloadorg.eclipse.tcf-9c70311b440b7192b6af02fd9dd5fc806492b66a.tar.gz
org.eclipse.tcf-9c70311b440b7192b6af02fd9dd5fc806492b66a.tar.xz
org.eclipse.tcf-9c70311b440b7192b6af02fd9dd5fc806492b66a.zip
Target Explorer: remove old peer state
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui')
-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
14 files changed, 60 insertions, 129 deletions
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