diff options
author | Darin Wright | 2006-01-04 20:55:27 +0000 |
---|---|---|
committer | Darin Wright | 2006-01-04 20:55:27 +0000 |
commit | 8e1a942f1dc3697378e656b1b967caf5128c284b (patch) | |
tree | c308e7769b205567d790cddd03622a1f7c7a7bb6 | |
parent | 505d2a4f255750160ea25194dec29dff1cece9fc (diff) | |
download | eclipse.platform.debug-8e1a942f1dc3697378e656b1b967caf5128c284b.tar.gz eclipse.platform.debug-8e1a942f1dc3697378e656b1b967caf5128c284b.tar.xz eclipse.platform.debug-8e1a942f1dc3697378e656b1b967caf5128c284b.zip |
[r3.1.2] Bug 116217 - RoS action failure in editor context menu.
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java index 4b7fb05a0..f31798e69 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java @@ -57,14 +57,16 @@ public class LaunchShortcutAction extends Action { if (wb != null) { IWorkbenchPage page = wb.getActivePage(); if (page != null) { - ISelection selection = page.getSelection(); - if (selection instanceof IStructuredSelection) { - fShortcut.launch(selection, fMode); - } else { + if (page.getActivePart() == page.getActiveEditor()) { IEditorPart editor = page.getActiveEditor(); if (editor != null) { fShortcut.launch(editor, fMode); } + } else { + ISelection selection = page.getSelection(); + if (selection instanceof IStructuredSelection) { + fShortcut.launch(selection, fMode); + } } } } |