Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-06-10 11:37:17 -0400
committerUwe Stieber2015-06-10 11:56:50 -0400
commit1b12ce894977028db8b50af02b4886fb159b52c2 (patch)
tree5533eb104fd40b5a9b379a35f13b0b19f6997342
parent7d65f47449ed865302f9d0b59907c5a4c2a22f54 (diff)
downloadorg.eclipse.tcf-1b12ce894977028db8b50af02b4886fb159b52c2.tar.gz
org.eclipse.tcf-1b12ce894977028db8b50af02b4886fb159b52c2.tar.xz
org.eclipse.tcf-1b12ce894977028db8b50af02b4886fb159b52c2.zip
Target Explorer: Clear ping timeout property if it matches the default ping timeout
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java
index 6cee2255d..e7862697c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java
@@ -122,7 +122,12 @@ public class PingTimeoutSection extends AbstractSection implements IDataExchange
String value = SWTControlUtil.getText(verbosity);
if (value != null && !"".equals(value)) { //$NON-NLS-1$
- attributes.setProperty(IPeerProperties.PROP_PING_TIMEOUT, value);
+ int timeout = -1;
+ try {
+ timeout = Integer.decode(value).intValue();
+ } catch (NumberFormatException e) { /* ignored on purpose */ }
+
+ attributes.setProperty(IPeerProperties.PROP_PING_TIMEOUT, timeout != -1 && timeout != defaultPingTimeout ? value : Integer.toString(defaultPingTimeout));
}
}

Back to the top