Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-06-10 11:37:17 -0400
committerUwe Stieber2015-06-10 11:37:17 -0400
commitc91642c58c419a4b961530074e46f8b74de0871c (patch)
tree8a80aca17e1d3f5f536ddeb3eda0402040394ad7
parentad05b14688ea7484117257e73ba815e3491f1096 (diff)
downloadorg.eclipse.tcf-c91642c58c419a4b961530074e46f8b74de0871c.tar.gz
org.eclipse.tcf-c91642c58c419a4b961530074e46f8b74de0871c.tar.xz
org.eclipse.tcf-c91642c58c419a4b961530074e46f8b74de0871c.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