Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-01-31 11:00:26 -0500
committerDarin Wright2008-01-31 11:00:26 -0500
commit1ff19b0d40844b4970d3d599b43ccfe5616094e2 (patch)
tree30d71b5ca1c6385957cbf8eb5463b5aeac6d524c
parent296e9af6270db6ea21d3719e87b9f2fbe8ae9541 (diff)
downloadeclipse.platform.debug-1ff19b0d40844b4970d3d599b43ccfe5616094e2.tar.gz
eclipse.platform.debug-1ff19b0d40844b4970d3d599b43ccfe5616094e2.tar.xz
eclipse.platform.debug-1ff19b0d40844b4970d3d599b43ccfe5616094e2.zip
Bug 217279 - [launch] Allow ILaunchShortcut2 to provide resource mapping
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java1
2 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
index b40f8eda1..73498a43f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
@@ -112,8 +112,10 @@ public final class ContextRunner {
LaunchConfigurationManager lcm = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
String mode = group.getMode();
List shortcuts = fLRM.getShortcutsForSelection(selection, mode);
- if(resource == null) {
- resource = fLRM.getLaunchableResource(shortcuts, selection);
+ // allow the shortcut to translate/provide the resource for the launch
+ IResource overrideResource = fLRM.getLaunchableResource(shortcuts, selection);
+ if(overrideResource != null) {
+ resource = overrideResource;
}
shortcuts = fLRM.pruneShortcuts(shortcuts, resource, mode);
//see if the context is a shared configuration
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
index 03966fa17..4ae0bd3fc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
@@ -461,7 +461,6 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
public List getParticipatingLaunchConfigurations(IStructuredSelection selection, IResource resource, List shortcuts, String mode) {
List configs = new ArrayList();
boolean useDefault = false;
- //IStructuredSelection ss = SelectedResourceManager.getDefault().getCurrentSelection();
if(selection != null) {
Object o = selection.getFirstElement();
LaunchShortcutExtension ext = null;

Back to the top