mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 560186: Sort JTAG device list
Change-Id: Ieff78b4b527418ff2e4e06c8f3850605e397f619
This commit is contained in:
parent
a7635221af
commit
d70521fcf8
4 changed files with 26 additions and 9 deletions
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<component id="org.eclipse.cdt.debug.gdbjtag.core" version="2">
|
||||||
|
<resource path="src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConstants.java" type="org.eclipse.cdt.debug.gdbjtag.core.IGDBJtagConstants">
|
||||||
|
<filter id="388194388">
|
||||||
|
<message_arguments>
|
||||||
|
<message_argument value="org.eclipse.cdt.debug.gdbjtag.core.IGDBJtagConstants"/>
|
||||||
|
<message_argument value="DEFAULT_JTAG_DEVICE_ID"/>
|
||||||
|
</message_arguments>
|
||||||
|
</filter>
|
||||||
|
</resource>
|
||||||
|
</component>
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 - 2018 QNX Software Systems and others.
|
* Copyright (c) 2007 - 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - Disable reset and halt by default, bug 529171
|
* John Dallaway - Disable reset and halt by default, bug 529171
|
||||||
* Torbjörn Svensson (STMicroelectronics) - Bug 535024
|
* Torbjörn Svensson (STMicroelectronics) - Bug 535024
|
||||||
|
* John Dallaway - Sort JTAG device list, bug 560186
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core;
|
package org.eclipse.cdt.debug.gdbjtag.core;
|
||||||
|
@ -101,7 +102,7 @@ public interface IGDBJtagConstants {
|
||||||
/** @since 7.0 */
|
/** @since 7.0 */
|
||||||
public static final String DEFAULT_STOP_AT = ""; //$NON-NLS-1$
|
public static final String DEFAULT_STOP_AT = ""; //$NON-NLS-1$
|
||||||
/** @since 9.2 */
|
/** @since 9.2 */
|
||||||
public static final String DEFAULT_JTAG_DEVICE_ID = ""; //$NON-NLS-1$
|
public static final String DEFAULT_JTAG_DEVICE_ID = "org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.genericDevice"; //$NON-NLS-1$
|
||||||
/** @since 9.2 */
|
/** @since 9.2 */
|
||||||
public static final String DEFAULT_JTAG_DEVICE_NAME = ""; //$NON-NLS-1$
|
public static final String DEFAULT_JTAG_DEVICE_NAME = ""; //$NON-NLS-1$
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.ui;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.ui;singleton:=true
|
||||||
Bundle-Version: 8.1.100.qualifier
|
Bundle-Version: 8.1.200.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.ui.Activator
|
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.ui.Activator
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2018 QNX Software Systems and others.
|
* Copyright (c) 2007, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
* allow connections via serial ports and pipes).
|
* allow connections via serial ports and pipes).
|
||||||
* John Dallaway - Ensure correct SessionType enabled, bug 334110
|
* John Dallaway - Ensure correct SessionType enabled, bug 334110
|
||||||
* Torbjörn Svensson (STMicroelectronics) - Bug 535024
|
* Torbjörn Svensson (STMicroelectronics) - Bug 535024
|
||||||
|
* John Dallaway - Sort JTAG device list, bug 560186
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.gdbjtag.ui;
|
package org.eclipse.cdt.debug.gdbjtag.ui;
|
||||||
|
@ -27,6 +28,7 @@ package org.eclipse.cdt.debug.gdbjtag.ui;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.debug.gdbjtag.core.Activator;
|
import org.eclipse.cdt.debug.gdbjtag.core.Activator;
|
||||||
|
@ -256,9 +258,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
|
|
||||||
GDBJtagDeviceContribution[] availableDevices = GDBJtagDeviceContributionFactory.getInstance()
|
GDBJtagDeviceContribution[] availableDevices = GDBJtagDeviceContributionFactory.getInstance()
|
||||||
.getGDBJtagDeviceContribution();
|
.getGDBJtagDeviceContribution();
|
||||||
for (int i = 0; i < availableDevices.length; i++) {
|
Arrays.stream(availableDevices).map(GDBJtagDeviceContribution::getDeviceName).sorted()
|
||||||
jtagDevice.add(availableDevices[i].getDeviceName());
|
.forEach(name -> jtagDevice.add(name));
|
||||||
}
|
|
||||||
|
|
||||||
jtagDevice.addModifyListener(new ModifyListener() {
|
jtagDevice.addModifyListener(new ModifyListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -564,8 +565,11 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
} else {
|
} else {
|
||||||
String ip = ipAddress.getText().trim();
|
String ip = ipAddress.getText().trim();
|
||||||
configuration.setAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ip);
|
configuration.setAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ip);
|
||||||
int port = Integer.valueOf(portNumber.getText().trim()).intValue();
|
String port = portNumber.getText().trim();
|
||||||
configuration.setAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, port);
|
if (!port.isEmpty()) {
|
||||||
|
configuration.setAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER,
|
||||||
|
Integer.valueOf(port).intValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
Activator.log(e);
|
Activator.log(e);
|
||||||
|
@ -589,6 +593,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
|
|
||||||
configuration.setAttribute(IGDBJtagConstants.ATTR_USE_REMOTE_TARGET,
|
configuration.setAttribute(IGDBJtagConstants.ATTR_USE_REMOTE_TARGET,
|
||||||
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET);
|
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET);
|
||||||
|
configuration.setAttribute(IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, IGDBJtagConstants.DEFAULT_JTAG_DEVICE_ID);
|
||||||
configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
||||||
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
|
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
|
||||||
|
|
Loading…
Add table
Reference in a new issue