Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-01-19 17:24:01 +0000
committerJeff Johnston2018-01-19 19:37:44 +0000
commit746993c9eed534783dbaf563d6ba8280e27a84f4 (patch)
treedc90f0004e1321fe98310473bf5c6aa9eda711d6
parenta4599f7c3600a4a1936b447a48e026a2ecf436ba (diff)
downloadorg.eclipse.cdt-746993c9eed534783dbaf563d6ba8280e27a84f4.tar.gz
org.eclipse.cdt-746993c9eed534783dbaf563d6ba8280e27a84f4.tar.xz
org.eclipse.cdt-746993c9eed534783dbaf563d6ba8280e27a84f4.zip
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
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
index e3f86ff5d05..e22d04ba2b0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
@@ -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);
+ }
}
}
}

Back to the top