mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Various tweaks/cleanup
This commit is contained in:
parent
e09763e581
commit
74e858e927
1 changed files with 15 additions and 16 deletions
|
@ -368,6 +368,7 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
/**
|
/**
|
||||||
* @param text
|
* @param text
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
protected void updateDeviceIpPort(String selectedDeviceName) {
|
protected void updateDeviceIpPort(String selectedDeviceName) {
|
||||||
if (selectedDeviceName.equals(savedJtagDevice)) {
|
if (selectedDeviceName.equals(savedJtagDevice)) {
|
||||||
return;
|
return;
|
||||||
|
@ -384,6 +385,7 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
IGDBJtagConnection connectionDevice = (IGDBJtagConnection)selectedDevice;
|
IGDBJtagConnection connectionDevice = (IGDBJtagConnection)selectedDevice;
|
||||||
connection.setText(connectionDevice.getDefaultDeviceConnection());
|
connection.setText(connectionDevice.getDefaultDeviceConnection());
|
||||||
} else {
|
} else {
|
||||||
|
// legacy way
|
||||||
ipAddress.setText(selectedDevice.getDefaultIpAddress());
|
ipAddress.setText(selectedDevice.getDefaultIpAddress());
|
||||||
portNumber.setText(selectedDevice.getDefaultPortNumber());
|
portNumber.setText(selectedDevice.getDefaultPortNumber());
|
||||||
}
|
}
|
||||||
|
@ -468,28 +470,25 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
|
|
||||||
for (int i = 0; i < jtagDevice.getItemCount(); i++) {
|
for (int i = 0; i < jtagDevice.getItemCount(); i++) {
|
||||||
if (jtagDevice.getItem(i).equals(savedJtagDevice)) {
|
if (jtagDevice.getItem(i).equals(savedJtagDevice)) {
|
||||||
storedAddress = configuration.getAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ""); //$NON-NLS-1$
|
storedAddress = configuration.getAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, IGDBJtagConstants.DEFAULT_IP_ADDRESS); //$NON-NLS-1$
|
||||||
storedPort = configuration.getAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, 0);
|
storedPort = configuration.getAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, IGDBJtagConstants.DEFAULT_PORT_NUMBER);
|
||||||
storedConnection = configuration.getAttribute(IGDBJtagConstants.ATTR_CONNECTION, ""); //$NON-NLS-1$
|
storedConnection = configuration.getAttribute(IGDBJtagConstants.ATTR_CONNECTION, IGDBJtagConstants.DEFAULT_CONNECTION); //$NON-NLS-1$
|
||||||
jtagDevice.select(i);
|
jtagDevice.select(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (storedConnection!=null) {
|
// New generic connection settings
|
||||||
try {
|
try {
|
||||||
connection.setText(new URI(storedConnection).getSchemeSpecificPart());
|
connection.setText(new URI(storedConnection).getSchemeSpecificPart());
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
Activator.log(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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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) {
|
} catch (CoreException e) {
|
||||||
Activator.getDefault().getLog().log(e.getStatus());
|
Activator.getDefault().getLog().log(e.getStatus());
|
||||||
|
|
Loading…
Add table
Reference in a new issue