Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2002-02-09 22:09:01 +0000
committerDarin Swanson2002-02-09 22:09:01 +0000
commite17d9a529cf9ff665aee3b4db0b92d355c96572b (patch)
tree41bfebe418dce01c9765aead11de2f292a2c4106
parent264aa6691b2aff21aaa6efd5e79f6bea26ab6f9a (diff)
downloadeclipse.platform.debug-e17d9a529cf9ff665aee3b4db0b92d355c96572b.tar.gz
eclipse.platform.debug-e17d9a529cf9ff665aee3b4db0b92d355c96572b.tar.xz
eclipse.platform.debug-e17d9a529cf9ff665aee3b4db0b92d355c96572b.zip
Bug 9354 - Number of action delegates pretending to be actions
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java45
1 files changed, 14 insertions, 31 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
index 443065940..ed1306212 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
@@ -7,23 +7,20 @@ package org.eclipse.debug.internal.ui.actions;
import org.eclipse.debug.internal.ui.DebugPluginImages;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
import org.eclipse.debug.internal.ui.LaunchHistoryElement;
import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.help.WorkbenchHelp;
/**
* Re-runs or re-debugs the last launch.
*/
-public class RelaunchLastAction extends Action implements IWorkbenchWindowActionDelegate {
+public class RelaunchLastAction implements IWorkbenchWindowActionDelegate {
/**
* When this action is created as a delegate, this flag indicates
@@ -32,32 +29,6 @@ public class RelaunchLastAction extends Action implements IWorkbenchWindowAction
*/
private boolean fInitializedImages = false;
- public RelaunchLastAction() {
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.RELAUNCH_LAST_ACTION });
- setActionImages(this);
- }
-
- /**
- * @see IAction
- */
- public void run() {
- final LaunchHistoryElement recent= DebugUIPlugin.getDefault().getLastLaunch();
- if (recent == null) {
- Display.getCurrent().beep();
- } else {
- if (!DebugUIPlugin.saveAndBuild()) {
- return;
- }
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- RelaunchActionDelegate.relaunch(recent);
- }
- });
- }
- }
-
/**
* @see IWorkbenchWindowActionDelegate
*/
@@ -74,7 +45,19 @@ public class RelaunchLastAction extends Action implements IWorkbenchWindowAction
* @see IActionDelegate
*/
public void run(IAction action){
- run();
+ final LaunchHistoryElement recent= DebugUIPlugin.getDefault().getLastLaunch();
+ if (recent == null) {
+ Display.getCurrent().beep();
+ } else {
+ if (!DebugUIPlugin.saveAndBuild()) {
+ return;
+ }
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ RelaunchActionDelegate.relaunch(recent);
+ }
+ });
+ }
}
/**

Back to the top