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.views
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.views')
-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
2 files changed, 12 insertions, 11 deletions
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);

Back to the top