mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 18:25:40 +02:00
Bug 530053 - Launching locally after Container launch doesn't work
- add logic in CApplicationLaunchShortcut find launch configs to discard any launch config that has a Docker Connection URI attribute Change-Id: Ieb53f4c89b24cd3fac01bec35eafc8c62748d0b3
This commit is contained in:
parent
a4599f7c36
commit
746993c9ee
1 changed files with 8 additions and 3 deletions
|
@ -63,6 +63,8 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
||||||
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
||||||
|
|
||||||
public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
||||||
|
private final static String CONNECTION_URI = "org.eclipse.cdt.docker.launcher.connection_uri"; //$NON-NLS-1$
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void launch(IEditorPart editor, String mode) {
|
public void launch(IEditorPart editor, String mode) {
|
||||||
searchAndLaunch(new Object[] { editor.getEditorInput() }, mode);
|
searchAndLaunch(new Object[] { editor.getEditorInput() }, mode);
|
||||||
|
@ -98,9 +100,12 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
||||||
IPath programPath = CDebugUtils.getProgramPath(config);
|
IPath programPath = CDebugUtils.getProgramPath(config);
|
||||||
String projectName = CDebugUtils.getProjectName(config);
|
String projectName = CDebugUtils.getProjectName(config);
|
||||||
IPath name = bin.getResource().getProjectRelativePath();
|
IPath name = bin.getResource().getProjectRelativePath();
|
||||||
if (programPath != null && programPath.equals(name)) {
|
// don't match any launch config that is used for a Container launch
|
||||||
if (projectName != null && projectName.equals(bin.getCProject().getProject().getName())) {
|
if (config.getAttribute(CONNECTION_URI, "").isEmpty()) { //$NON-NLS-1$
|
||||||
candidateConfigs.add(config);
|
if (programPath != null && programPath.equals(name)) {
|
||||||
|
if (projectName != null && projectName.equals(bin.getCProject().getProject().getName())) {
|
||||||
|
candidateConfigs.add(config);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue