KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > actions > DebugLastAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.actions;
12
13
14 import org.eclipse.debug.core.ILaunchManager;
15 import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
16 import org.eclipse.debug.ui.IDebugUIConstants;
17
18 /**
19  * Relaunches the last debug-mode launch
20  *
21  * This menu item appears in the main 'Run' menu
22  *
23  * @see RelaunchLastAction
24  * @see RunLastAction
25  * @see ProfileLastAction
26  */

27 public class DebugLastAction extends RelaunchLastAction {
28     
29     /**
30      * @see RelaunchLastAction#getMode()
31      */

32     public String JavaDoc getMode() {
33         return ILaunchManager.DEBUG_MODE;
34     }
35     
36     /**
37      * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#getLaunchGroupId()
38      */

39     public String JavaDoc getLaunchGroupId() {
40         return IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
41     }
42
43     /**
44      * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getText()
45      */

46     protected String JavaDoc getText() {
47         if(LaunchingResourceManager.isContextLaunchEnabled()) {
48             return ActionMessages.DebugLastAction_1;
49         }
50         else {
51             return ActionMessages.DebugLastAction_0;
52         }
53     }
54
55     /**
56      * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getTooltipText()
57      */

58     protected String JavaDoc getTooltipText() {
59         return ""; //$NON-NLS-1$
60
}
61
62     /* (non-Javadoc)
63      * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
64      */

65     protected String JavaDoc getCommandId() {
66         return "org.eclipse.debug.ui.commands.DebugLast"; //$NON-NLS-1$
67
}
68     
69     /* (non-Javadoc)
70      * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
71      */

72     protected String JavaDoc getDescription() {
73         if(LaunchingResourceManager.isContextLaunchEnabled()) {
74             return ActionMessages.DebugLastAction_2;
75         }
76         else {
77             return ActionMessages.DebugLastAction_3;
78         }
79     }
80 }
81
Popular Tags