Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1cb59e7d853d8e9ee939cd3b493ee547ee65db31 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package org.eclipse.debug.core.model;

/*
 * Licensed Materials - Property of IBM,
 * WebSphere Studio Workbench
 * (c) Copyright IBM Corp 2000
 */

import org.eclipse.debug.core.ILauncher;

/**
 * A launcher delegate is an implementation of the
 * <code>org.eclipse.debug.core.launchers</code> extension point. The
 * debug plug-in creates a proxy to each launcher extension, and
 * lazily instantiates an extension when required. A launch delegate
 * starts a debug session with a specific debug model, and/or
 * launches one or more system processes, registering the result
 * with the launch manager.
 * <p>
 * A launcher extension is defined in <code>plugin.xml</code>.
 * Following is an example definition of a launcher extension.
 * <pre>
 * &lt;extension point="org.eclipse.debug.core.launchers"&gt;
 *   &lt;launcher 
 *      id="com.example.ExampleIdentifier"
 *      class="com.example.ExmapleLauncher"
 *      modes="run, debug"
 *      label="Example Launcher"
 *      wizard="com.example.ExampleLaunchWizard"
 *      layout="com.example.JavaLayout"&gt;
 *   &lt;/launcher&gt;
 * &lt;/extension&gt;
 * </pre>
 * The attributes are specified as follows:
 * <ul>
 * <li><code>id</code> specifies a unique identifier for this launcher.</li>
 * <li><code>class</code> specifies the fully qualified name of the java class
 *   that implements this interface.</li>
 * <li><code>modes</code> specifies a comma separated list of the modes this
 *    launcher supports - <code>"run"</code> and/or <code>"debug</code>.</li>
 * <li><code>label</code> specifies a human readable label for this launcher
 *    extension.</li>
 * <li><code>wizard</code> specifies the fully qualified name of the java class
 *    that implements <code>org.eclipse.debug.ui.ILaunchWizard</code>. The debug UI
 *    may invoke the wizard to perform a launch, or this launcher extension
 *    may present the wizard when asked to launch.</li>
 * <li></code>layout</code> specifies the identifier of a layout that should be
 *    used to present the resulting launch.</li>
 * </ul>
 * </p>
 * <p>
 * Clients may implement this interface.
 * </p>
 * <p>
 * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to 
 * change significantly before reaching stability. It is being made available at this early stage to solicit feedback 
 * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
 * (repeatedly) as the API evolves.
 * </p>
 * @see org.eclipse.debug.core.ILaunch
 * @see org.eclipse.debug.core.Launch
 * @see org.eclipse.debug.core.ILaunchManager
 * @see org.eclipse.debug.core.ILauncher
 */
public interface ILauncherDelegate {
	/**
	 * Notifies this launcher delegate to launch in the given mode,
	 * register the resulting launch with  the launch manager.
	 * Returns <code>true</code> if successful, otherwise <code>false</code>.
	 * This typically results in the creation of one or more processes and/or
	 * a debug target. The collection of elements provides context for 
	 * launch. The determination of which or how many objects to launch
	 * is launcher dependent. This method blocks until the launch is
	 * complete. The given launcher is the owner of this delegate.
	 * <p>
	 * For example, when the debug UI invokes a launcher, the
	 * collection of elements passed in represent the selected elements
	 * in the UI, and the mode specified will be run or debug (depending on
	 * which launch button was pressed). A launcher will generally examine the 
	 * element collection to determine what to launch. For example, if the
	 * collection contains one launchable program, or one runnable program
	 * can be inferred from the collection, the launcher will launch
	 * that program. If the collection contains more than one runnable
	 * program, or more than one runnable program can be inferred from the
	 * collection, the launcher may ask the user to select a program to launch.
	 * </p>
	 * <p>
	 * Launching the program itself usually requires running an external
	 * program specific to a debug architecture/debug model, and wrapping the
	 * result in a debug target or process that can be registered in a launch object. 
	 * </p>
	 *
	 * @param elements an array of objects providing a context for the launch
	 * @param mode run or debug (as defined by <code>ILaunchManager.RUN_MODE</code>,
	 *    <code>ILaunchManager.DEBUG_MODE</code>)
	 * @param launcher the proxy to this lazily instantiated extension which needs
	 *    to be supplied in the resulting launch object
	 * @return whether the launch succeeded
	 *
	 * @see org.eclipse.debug.core.ILaunch
	 * @see org.eclipse.debug.core.Launch
	 * @see IDebugTarget
	 * @see IProcess
	 * @see org.eclipse.debug.core.ILaunchManager#registerLaunch
	 */
	boolean launch(Object[] elements, String mode, ILauncher launcher);
}


Back to the top