mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-06 00:25:25 +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
(cherry picked from commit 746993c9ee
)
This commit is contained in:
parent
d84a19cfb9
commit
776a32c75e
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;
|
||||
|
||||
public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
||||
private final static String CONNECTION_URI = "org.eclipse.cdt.docker.launcher.connection_uri"; //$NON-NLS-1$
|
||||
|
||||
@Override
|
||||
public void launch(IEditorPart editor, String mode) {
|
||||
searchAndLaunch(new Object[] { editor.getEditorInput() }, mode);
|
||||
|
@ -98,9 +100,12 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
|||
IPath programPath = CDebugUtils.getProgramPath(config);
|
||||
String projectName = CDebugUtils.getProjectName(config);
|
||||
IPath name = bin.getResource().getProjectRelativePath();
|
||||
if (programPath != null && programPath.equals(name)) {
|
||||
if (projectName != null && projectName.equals(bin.getCProject().getProject().getName())) {
|
||||
candidateConfigs.add(config);
|
||||
// don't match any launch config that is used for a Container launch
|
||||
if (config.getAttribute(CONNECTION_URI, "").isEmpty()) { //$NON-NLS-1$
|
||||
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