mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 16:15:25 +02:00
Adjust to the final launch config API.
Change-Id: Ia539832e9e8c4d95cdac9295aae7f56552f10a2b
This commit is contained in:
parent
1e7ebf5d87
commit
2e92a33169
1 changed files with 12 additions and 9 deletions
|
@ -14,20 +14,19 @@ import org.eclipse.cdt.arduino.core.internal.ArduinoProjectNature;
|
||||||
import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection;
|
import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
|
import org.eclipse.debug.core.ILaunchConfigurationType;
|
||||||
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
||||||
import org.eclipse.launchbar.core.ProjectPerTypeLaunchConfigProvider;
|
import org.eclipse.launchbar.core.ProjectPerTargetLaunchConfigProvider;
|
||||||
import org.eclipse.remote.core.IRemoteConnection;
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
|
|
||||||
public class ArduinoLaunchConfigurationProvider extends ProjectPerTypeLaunchConfigProvider {
|
public class ArduinoLaunchConfigurationProvider extends ProjectPerTargetLaunchConfigProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getLaunchConfigurationTypeId() {
|
public ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, IRemoteConnection target)
|
||||||
return ArduinoLaunchConfigurationDelegate.TYPE_ID;
|
throws CoreException {
|
||||||
}
|
return DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(
|
||||||
|
ArduinoLaunchConfigurationDelegate.TYPE_ID);
|
||||||
@Override
|
|
||||||
protected String getRemoteConnectionTypeId() {
|
|
||||||
return ArduinoRemoteConnection.TYPE_ID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,6 +35,10 @@ public class ArduinoLaunchConfigurationProvider extends ProjectPerTypeLaunchConf
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!target.getConnectionType().getId().equals(ArduinoRemoteConnection.TYPE_ID)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// must have the arduino nature
|
// must have the arduino nature
|
||||||
IProject project = descriptor.getAdapter(IProject.class);
|
IProject project = descriptor.getAdapter(IProject.class);
|
||||||
return ArduinoProjectNature.hasNature(project);
|
return ArduinoProjectNature.hasNature(project);
|
||||||
|
|
Loading…
Add table
Reference in a new issue