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 8a474df65da..41528453566 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