mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Adjust to removal of special launch config delegate for remote.
Change-Id: I767ca01a8a233b2b6ab197991a696b4deef52b8c
This commit is contained in:
parent
56032058d2
commit
809f470514
3 changed files with 13 additions and 6 deletions
|
@ -16,6 +16,7 @@ public class Messages extends NLS {
|
|||
private static final String BUNDLE_NAME = "org.eclipse.cdt.arduino.core.internal.messages"; //$NON-NLS-1$
|
||||
public static String ArduinoLaunchConfigurationDelegate_0;
|
||||
public static String ArduinoLaunchConfigurationDelegate_1;
|
||||
public static String ArduinoLaunchConfigurationDelegate_2;
|
||||
public static String ArduinoProjectGenerator_0;
|
||||
|
||||
static {
|
||||
|
|
|
@ -38,16 +38,18 @@ import org.eclipse.core.runtime.jobs.Job;
|
|||
import org.eclipse.debug.core.DebugPlugin;
|
||||
import org.eclipse.debug.core.ILaunch;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
import org.eclipse.launchbar.core.launch.RemoteLaunchConfigurationDelegate;
|
||||
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
|
||||
import org.eclipse.launchbar.core.PerTargetLaunchConfigProvider;
|
||||
import org.eclipse.remote.core.IRemoteConnection;
|
||||
|
||||
public class ArduinoLaunchConfigurationDelegate extends RemoteLaunchConfigurationDelegate {
|
||||
public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
|
||||
|
||||
public static final String TYPE_ID = "org.eclipse.cdt.arduino.core.launchConfigurationType"; //$NON-NLS-1$
|
||||
|
||||
@Override
|
||||
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IRemoteConnection target,
|
||||
IProgressMonitor monitor) throws CoreException {
|
||||
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
|
||||
IRemoteConnection target = PerTargetLaunchConfigProvider.getTarget(configuration);
|
||||
|
||||
// 1. make sure proper build config is set active
|
||||
IProject project = configuration.getMappedResources()[0].getProject();
|
||||
ICProjectDescription projDesc = CCorePlugin.getDefault().getProjectDescription(project);
|
||||
|
@ -75,12 +77,15 @@ public class ArduinoLaunchConfigurationDelegate extends RemoteLaunchConfiguratio
|
|||
}
|
||||
|
||||
@Override
|
||||
public void launch(final ILaunchConfiguration configuration, String mode, final IRemoteConnection target,
|
||||
final ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
public void launch(final ILaunchConfiguration configuration, String mode, final ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
new Job(Messages.ArduinoLaunchConfigurationDelegate_0) {
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
ArduinoLaunchConsoleService consoleService = getConsoleService();
|
||||
IRemoteConnection target = PerTargetLaunchConfigProvider.getTarget(configuration);
|
||||
if (target == null) {
|
||||
return new Status(IStatus.ERROR, Activator.getId(), Messages.ArduinoLaunchConfigurationDelegate_2);
|
||||
}
|
||||
|
||||
// The project
|
||||
IProject project = (IProject) configuration.getMappedResources()[0];
|
||||
|
|
|
@ -10,4 +10,5 @@ ArduinoLaunchConfigurationDelegate_1=No active Arduino remote connection.
|
|||
# QNX Software Systems - Initial API and implementation
|
||||
################################################################################
|
||||
ArduinoLaunchConfigurationDelegate_0=Arduino Launch
|
||||
ArduinoLaunchConfigurationDelegate_2=Target has not been selected for Launch Configuration
|
||||
ArduinoProjectGenerator_0=Write Arduino project file
|
||||
|
|
Loading…
Add table
Reference in a new issue