Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorJohn Cortell2010-05-06 15:16:17 -0400
committerJohn Cortell2010-05-06 15:16:17 -0400
commit74e858e927bd4d3f2f7a1b41e2012b5123da2b58 (patch)
tree53f6159029244eb1d25f53f6dacf67451364f110 /jtag
parente09763e58171ab8cf00f25940d75d5e9801689d3 (diff)
downloadorg.eclipse.cdt-74e858e927bd4d3f2f7a1b41e2012b5123da2b58.tar.gz
org.eclipse.cdt-74e858e927bd4d3f2f7a1b41e2012b5123da2b58.tar.xz
org.eclipse.cdt-74e858e927bd4d3f2f7a1b41e2012b5123da2b58.zip
Various tweaks/cleanup
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDebuggerTab.java31
1 files changed, 15 insertions, 16 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDebuggerTab.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDebuggerTab.java
index 8a474df65d..4152845356 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDebuggerTab.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDebuggerTab.java
@@ -368,6 +368,7 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
/**
* @param text
*/
+ @SuppressWarnings("deprecation")
protected void updateDeviceIpPort(String selectedDeviceName) {
if (selectedDeviceName.equals(savedJtagDevice)) {
return;
@@ -384,6 +385,7 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
IGDBJtagConnection connectionDevice = (IGDBJtagConnection)selectedDevice;
connection.setText(connectionDevice.getDefaultDeviceConnection());
} else {
+ // legacy way
ipAddress.setText(selectedDevice.getDefaultIpAddress());
portNumber.setText(selectedDevice.getDefaultPortNumber());
}
@@ -468,28 +470,25 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
for (int i = 0; i < jtagDevice.getItemCount(); i++) {
if (jtagDevice.getItem(i).equals(savedJtagDevice)) {
- storedAddress = configuration.getAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ""); //$NON-NLS-1$
- storedPort = configuration.getAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, 0);
- storedConnection = configuration.getAttribute(IGDBJtagConstants.ATTR_CONNECTION, ""); //$NON-NLS-1$
+ storedAddress = configuration.getAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, IGDBJtagConstants.DEFAULT_IP_ADDRESS); //$NON-NLS-1$
+ storedPort = configuration.getAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, IGDBJtagConstants.DEFAULT_PORT_NUMBER);
+ storedConnection = configuration.getAttribute(IGDBJtagConstants.ATTR_CONNECTION, IGDBJtagConstants.DEFAULT_CONNECTION); //$NON-NLS-1$
jtagDevice.select(i);
break;
}
}
- if (storedConnection!=null) {
- try {
- connection.setText(new URI(storedConnection).getSchemeSpecificPart());
- } catch (URISyntaxException e) {
- Activator.log(e);
- }
- }
- if (storedAddress!=null)
- {
- // Treat as legacy network probe
- ipAddress.setText(storedAddress);
- String portString = (0<storedPort)&&(storedPort<=65535) ? Integer.valueOf(storedPort).toString() : ""; //$NON-NLS-1$
- portNumber.setText(portString);
+ // New generic connection settings
+ try {
+ connection.setText(new URI(storedConnection).getSchemeSpecificPart());
+ } catch (URISyntaxException e) {
+ Activator.log(e);
}
+
+ // Legacy TCP/IP based settings
+ ipAddress.setText(storedAddress);
+ String portString = (0<storedPort)&&(storedPort<=65535) ? Integer.valueOf(storedPort).toString() : ""; //$NON-NLS-1$
+ portNumber.setText(portString);
}
} catch (CoreException e) {
Activator.getDefault().getLog().log(e.getStatus());

Back to the top