KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > ILaunch


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.core;
12
13
14 import org.eclipse.core.runtime.IAdaptable;
15 import org.eclipse.debug.core.model.IDebugTarget;
16 import org.eclipse.debug.core.model.IProcess;
17 import org.eclipse.debug.core.model.ISourceLocator;
18 import org.eclipse.debug.core.model.ITerminate;
19
20 /**
21  * A launch is the result of launching a debug session
22  * and/or one or more system processes.
23  * <p>
24  * This interface is not intended to be implemented by clients. Clients
25  * should create instances of this interface by using the implementation
26  * provided by the class <code>Launch</code>.
27  * </p>
28  * @see Launch
29  * @see org.eclipse.debug.core.IProcessFactory
30  */

31 public interface ILaunch extends ITerminate, IAdaptable {
32     /**
33      * Returns the children of this launch - a collection
34      * of one or more debug targets and processes, possibly empty.
35      *
36      * @return an array (element type:<code>IDebugTarget</code> or <code>IProcess</code>),
37      * or an empty array
38      */

39     public Object JavaDoc[] getChildren();
40     /**
41      * Returns the primary (first) debug target associated with this launch, or <code>null</code>
42      * if no debug target is associated with this launch. All debug targets
43      * associated with this launch may be retrieved by
44      * <code>getDebugTargets()</code>.
45      *
46      * @return the primary debug target associated with this launch, or <code>null</code>
47      */

48     public IDebugTarget getDebugTarget();
49
50     /**
51      * Returns the processes that were launched,
52      * or an empty collection if no processes were launched.
53      *
54      * @return array of processes
55      */

56     public IProcess[] getProcesses();
57     
58     /**
59      * Returns all the debug targets associated with this launch,
60      * or an empty collection if no debug targets are associated
61      * with this launch. The primary debug target is the first
62      * in the collection (if any).
63      *
64      * @return array of debug targets
65      * @since 2.0
66      */

67     public IDebugTarget[] getDebugTargets();
68     
69     /**
70      * Adds the given debug target to this launch. Has no effect
71      * if the given debug target is already associated with this
72      * launch. Registered listeners are notified that this launch
73      * has changed.
74      *
75      * @param target debug target to add to this launch
76      * @since 2.0
77      */

78     public void addDebugTarget(IDebugTarget target);
79     
80     /**
81      * Removes the given debug target from this launch. Has no effect
82      * if the given debug target is not already associated with this
83      * launch. Registered listeners are notified that this launch
84      * has changed.
85      *
86      * @param target debug target to remove from this launch
87      * @since 2.0
88      */

89     public void removeDebugTarget(IDebugTarget target);
90     
91     /**
92      * Adds the given process to this launch. Has no effect
93      * if the given process is already associated with this
94      * launch. Registered listeners are notified that this launch
95      * has changed.
96      *
97      * @param process the process to add to this launch
98      * @since 2.0
99      */

100     public void addProcess(IProcess process);
101     
102     /**
103      * Removes the given process from this launch. Has no effect
104      * if the given process is not already associated with this
105      * launch. Registered listeners are notified that this launch
106      * has changed.
107      *
108      * @param process the process to remove from this launch
109      * @since 2.0
110      */

111     public void removeProcess(IProcess process);
112         
113     /**
114      * Returns the source locator to use for locating source elements for
115      * the debug target associated with this launch, or <code>null</code>
116      * if source lookup is not supported.
117      *
118      * @return the source locator
119      */

120     public ISourceLocator getSourceLocator();
121     
122     /**
123      * Sets the source locator to use for locating source elements for
124      * the debug target associated with this launch, or <code>null</code>
125      * if source lookup is not supported.
126      *
127      * @param sourceLocator source locator or <code>null</code>
128      * @since 2.0
129      */

130     public void setSourceLocator(ISourceLocator sourceLocator);
131         
132     /**
133      * Returns the mode of this launch - one of the mode constants defined by
134      * the launch manager.
135      *
136      * @return the launch mode
137      * @see ILaunchManager
138      */

139     public String JavaDoc getLaunchMode();
140     
141     /**
142      * Returns the configuration that was launched, or <code>null</code>
143      * if no configuration was launched.
144      *
145      * @return the launched configuration or <code>null</code>
146      * @since 2.0
147      */

148     public ILaunchConfiguration getLaunchConfiguration();
149     
150     /**
151      * Sets the value of a client defined attribute.
152      *
153      * @param key the attribute key
154      * @param value the attribute value
155      * @since 2.0
156      */

157     public void setAttribute(String JavaDoc key, String JavaDoc value);
158     
159     /**
160      * Returns the value of a client defined attribute.
161      *
162      * @param key the attribute key
163      * @return value the attribute value, or <code>null</code> if undefined
164      * @since 2.0
165      */

166     public String JavaDoc getAttribute(String JavaDoc key);
167     
168     /**
169      * Returns whether this launch contains at least one process
170      * or debug target.
171      *
172      * @return whether this launch contains at least one process
173      * or debug target
174      * @since 2.0
175      */

176     public boolean hasChildren();
177
178 }
179
Popular Tags