Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5a409b8c8574915df278b341b34e81ec56ab3ed3 (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
/*******************************************************************************
 *  Copyright (c) 2009, 2016 QNX Software Systems 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:
 *      QNX Software Systems - initial API and implementation
 *      Freescale Semiconductor
 *      SSI Schaefer
 *******************************************************************************/
package org.eclipse.debug.internal.core.groups;

import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.DebugCoreMessages;

/**
 * Represents a single child element of a launch group.
 *
 * @since 3.11
 */
public class GroupLaunchElement {
	public static final String MODE_INHERIT = "inherit"; //$NON-NLS-1$

	/**
	 * Describes the possible post-launch actions for each
	 * {@link GroupLaunchElement}.
	 * <p>
	 * These actions get performed after the associated
	 * {@link GroupLaunchElement} has been launched, before the next one is
	 * launched (or launching is finished).
	 */
	public static enum GroupElementPostLaunchAction {
		NONE(DebugCoreMessages.GroupLaunchConfigurationDelegate_None), //
		WAIT_FOR_TERMINATION(DebugCoreMessages.GroupLaunchConfigurationDelegate_Wait_until_terminated), //
		DELAY(DebugCoreMessages.GroupLaunchConfigurationDelegate_Delay), //
		OUTPUT_REGEXP(DebugCoreMessages.GroupLaunchElement_outputRegexp);

		private final String description;

		private GroupElementPostLaunchAction(String description) {
			this.description = description;
		}

		public String getDescription() {
			return description;
		}

		public static GroupLaunchElement.GroupElementPostLaunchAction valueOfDescription(String desc) {
			for (GroupLaunchElement.GroupElementPostLaunchAction e : values()) {
				if (e.description.equals(desc)) {
					return e;
				}
			}
			return NONE;
		}
	}

	public int index;
	public boolean enabled = true;
	public String mode = MODE_INHERIT;
	public GroupLaunchElement.GroupElementPostLaunchAction action = GroupElementPostLaunchAction.NONE;
	public boolean adoptIfRunning = false;
	public Object actionParam;
	public String name;
	public ILaunchConfiguration data;
}

Back to the top