Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-05-06 04:32:00 -0400
committerTobias Schwarz2014-05-06 04:32:00 -0400
commitb5c15a08adcdcb0b383bd54b5567e9c188153c47 (patch)
treecc86968931370fb615b9b712cad420fc1c4ac1e8
parent632b4de66f5866d3f37507d9a325468b515194d0 (diff)
downloadorg.eclipse.tcf-b5c15a08adcdcb0b383bd54b5567e9c188153c47.tar.gz
org.eclipse.tcf-b5c15a08adcdcb0b383bd54b5567e9c188153c47.tar.xz
org.eclipse.tcf-b5c15a08adcdcb0b383bd54b5567e9c188153c47.zip
Traget Explorer: fix connection lost handling
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/ProcessMonitorEventListener.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java12
2 files changed, 12 insertions, 5 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/ProcessMonitorEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/ProcessMonitorEventListener.java
index f5de7e33b..395ede63a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/ProcessMonitorEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/ProcessMonitorEventListener.java
@@ -103,10 +103,7 @@ public class ProcessMonitorEventListener extends AbstractEventListener {
}
});
}
- // Peer node connect state changed to disconnected or disconnecting
- else if (changeEvent.getNewValue().equals(new Integer(IConnectable.STATE_DISCONNECT_SCHEDULED))
- || changeEvent.getNewValue().equals(new Integer(IConnectable.STATE_DISCONNECTING))
- || changeEvent.getNewValue().equals(new Integer(IConnectable.STATE_DISCONNECTED))) {
+ else {
// Trigger a refresh on the whole viewer to show the "Please connect ..." text
treeControl.getViewer().refresh();
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java
index 0dacb5ca5..b602238c9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java
@@ -66,7 +66,17 @@ public class ContentProvider extends org.eclipse.tcf.te.tcf.processes.ui.navigat
return super.getElements(inputElement);
}
- String message = Messages.getStringDelegated(peerNode, "ProcessMonitor_ContentProvider_notConnected"); //$NON-NLS-1$
+ String message = null;
+ if (peerNode != null) {
+ if (peerNode.getConnectState() == IConnectable.STATE_CONNECTION_LOST ||
+ peerNode.getConnectState() == IConnectable.STATE_CONNECTION_RECOVERING) {
+ message = Messages.getStringDelegated(peerNode, "ProcessMonitor_ContentProvider_connectionLost"); //$NON-NLS-1$
+ }
+ if (message == null) {
+ message = Messages.getStringDelegated(peerNode, "ProcessMonitor_ContentProvider_notConnected"); //$NON-NLS-1$
+ }
+ }
+
return new Object[] { new MessageModelNode(message != null ? message : Messages.ContentProvider_notConnected, IStatus.INFO, false) };
}

Back to the top