KickJava   Java API By Example, From Geeks To Geeks.

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


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 profile-mode launch
20  *
21  * This menu item appears in the main 'Run' menu
22  *
23  * @see RelaunchLastAction
24  * @see RunLastAction
25  * @see DebugLastAction
26  *
27  */

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

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

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

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

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

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

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