diff options
author | Darin Wright | 2002-11-08 04:03:26 +0000 |
---|---|---|
committer | Darin Wright | 2002-11-08 04:03:26 +0000 |
commit | ee44db66c3b342118ba2da075c71353c4fb3f023 (patch) | |
tree | 3479ab9fa3920f6a7a55d0861de3822d627c1e9c /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java | |
parent | a4c44466a4d42a731020ab3c68baa9229e57a0a2 (diff) | |
download | eclipse.platform.debug-ee44db66c3b342118ba2da075c71353c4fb3f023.tar.gz eclipse.platform.debug-ee44db66c3b342118ba2da075c71353c4fb3f023.tar.xz eclipse.platform.debug-ee44db66c3b342118ba2da075c71353c4fb3f023.zip |
launch history management
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java index 21ffdb562..ae768c27f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java @@ -1,20 +1,17 @@ package org.eclipse.debug.internal.ui.actions; -/* - * (c) Copyright IBM Corp. 2000, 2001. - * All Rights Reserved. - */ +/********************************************************************** +Copyright (c) 2000, 2002 IBM Corp. All rights reserved. +This file is made available under the terms of the Common Public License v1.0 +which accompanies this distribution, and is available at +http://www.eclipse.org/legal/cpl-v10.html +**********************************************************************/ -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.internal.ui.DebugPluginImages; +import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.internal.ui.IDebugHelpContextIds; -import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement; import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.Action; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.custom.BusyIndicator; -import org.eclipse.swt.widgets.Display; import org.eclipse.ui.help.WorkbenchHelp; /** @@ -22,23 +19,16 @@ import org.eclipse.ui.help.WorkbenchHelp; */ public class RelaunchHistoryLaunchAction extends Action { - protected LaunchConfigurationHistoryElement fLaunch; + private ILaunchConfiguration fConfiguration; + private String fMode; - public RelaunchHistoryLaunchAction(LaunchConfigurationHistoryElement launch) { + public RelaunchHistoryLaunchAction(ILaunchConfiguration configuration, String mode) { super(); - fLaunch= launch; - setText(launch.getLabel()); + fConfiguration = configuration; + fMode = mode; + setText(configuration.getName()); ImageDescriptor descriptor= null; - if (launch.getLaunchConfiguration() != null) { - descriptor = DebugUITools.getDefaultImageDescriptor(launch.getLaunchConfiguration()); - } else { - if (launch.getMode().equals(ILaunchManager.DEBUG_MODE)) { - descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG); - } else { - descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN); - } - } - + descriptor = DebugUITools.getDefaultImageDescriptor(configuration); if (descriptor != null) { setImageDescriptor(descriptor); } @@ -51,13 +41,6 @@ public class RelaunchHistoryLaunchAction extends Action { * @see IAction */ public void run() { - if (!DebugUITools.saveAndBuildBeforeLaunch()) { - return; - } - BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { - public void run() { - RelaunchActionDelegate.relaunch(fLaunch); - } - }); + DebugUITools.launch(fConfiguration, fMode); } } |