Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: edd138713304f3f9c1a175cf78b55e7b300cbc64 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*******************************************************************************
 * Copyright (c) 2000, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.debug.internal.ui.actions;


import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.actions.RelaunchLastAction;

/**
 * Re-launches the last profile-mode launch
 *
 * This menu item appears in the main 'Run' menu
 *
 * @see RelaunchLastAction
 * @see RunLastAction
 * @see DebugLastAction
 *
 */
public class ProfileLastAction extends RelaunchLastAction {

	/* (non-Javadoc)
	 * @see org.eclipse.debug.ui.actions.RelaunchLastAction#getMode()
	 */
	@Override
	public String getMode() {
		return ILaunchManager.PROFILE_MODE;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getLaunchGroupId()
	 */
	@Override
	public String getLaunchGroupId() {
		return IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.debug.ui.actions.RelaunchLastAction#getText()
	 */
	@Override
	protected String getText() {
		if(LaunchingResourceManager.isContextLaunchEnabled()) {
			return ActionMessages.ProfileLastAction_1;
		}
		else {
			return ActionMessages.ProfileLastAction_0;
		}
	}

	/* (non-Javadoc)
	 * @see org.eclipse.debug.ui.actions.RelaunchLastAction#getTooltipText()
	 */
	@Override
	protected String getTooltipText() {
		return IInternalDebugCoreConstants.EMPTY_STRING;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
	 */
	@Override
	protected String getCommandId() {
		return "org.eclipse.debug.ui.commands.ProfileLast"; //$NON-NLS-1$
	}

	/* (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
	 */
	@Override
	protected String getDescription() {
		if(LaunchingResourceManager.isContextLaunchEnabled()) {
			return ActionMessages.ProfileLastAction_2;
		}
		else {
			return ActionMessages.ProfileLastAction_3;
		}
	}
}

Back to the top