|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.debug.core.Launch
A launch is the result of launching a debug session
and/or one or more system processes. This class provides
a public implementation of ILaunch
for client
use.
Clients may instantiate this class. Clients may subclass this class.
Many of the methods in this class that are part of the ILaunch
interface
are final. Clients that subclass this class are not intended to change the behavior
or implementation of the provided methods. Subclassing is only intended
to add additional information to a specific launch. For example, a client that
implements a launch object representing a Java launch might store a classpath
with the launch.
ILaunch
,
ILaunchManager
Constructor Summary | |
Launch(ILaunchConfiguration launchConfiguration,
String mode,
ISourceLocator locator)
Constructs a launch with the specified attributes. |
Method Summary | |
void |
addDebugTarget(IDebugTarget target)
Adds the given debug target to this launch. |
void |
addProcess(IProcess process)
Adds the given process to this launch. |
protected void |
addProcesses(IProcess[] processes)
Adds the given processes to this launch. |
boolean |
canDisconnect()
Returns whether this element can currently disconnect. |
boolean |
canTerminate()
Returns whether this element can be terminated. |
void |
disconnect()
Disconnects this element from its target. |
protected void |
fireChanged()
Notifies listeners that this launch has changed. |
protected void |
fireTerminate()
Notifies listeners that this launch has terminated. |
String |
getAttribute(String key)
Returns the value of a client defined attribute. |
Object[] |
getChildren()
Returns the children of this launch - a collection of one or more debug targets and processes, possibly empty. |
IDebugTarget |
getDebugTarget()
Returns the primary (first) debug target associated with this launch, or null
if no debug target is associated with this launch. |
IDebugTarget[] |
getDebugTargets()
Returns all the debug targets associated with this launch, or an empty collection if no debug targets are associated with this launch. |
protected List |
getDebugTargets0()
Returns the debug targets associated with this launch, in its internal form - a list |
ILaunchConfiguration |
getLaunchConfiguration()
Returns the configuration that was launched, or null
if no configuration was launched. |
protected ILaunchManager |
getLaunchManager()
Returns the launch manager. |
String |
getLaunchMode()
Returns the mode of this launch - one of the mode constants defined by the launch manager. |
IProcess[] |
getProcesses()
Returns the processes that were launched, or an empty collection if no processes were launched. |
protected List |
getProcesses0()
Returns the processes associated with this launch, in its internal form - a list. |
ISourceLocator |
getSourceLocator()
Returns the source locator to use for locating source elements for the debug target associated with this launch, or null
if source lookup is not supported. |
void |
handleDebugEvents(DebugEvent[] events)
Notifies this listener of the given debug events. |
boolean |
hasChildren()
Returns whether this launch contains at least one process or debug target. |
boolean |
isDisconnected()
Returns whether this element is disconnected. |
boolean |
isTerminated()
Returns whether this element is terminated. |
void |
launchAdded(ILaunch launch)
Notifies this listener that the specified launch has been added. |
void |
launchChanged(ILaunch launch)
Notifies this listener that the specified launch has changed. |
void |
launchConfigurationAdded(ILaunchConfiguration configuration)
The given launch configuration has been created. |
void |
launchConfigurationChanged(ILaunchConfiguration configuration)
The given launch configuration has changed in some way. |
void |
launchConfigurationRemoved(ILaunchConfiguration configuration)
The given launch configuration has been deleted. |
void |
launchRemoved(ILaunch launch)
Notifies this listener that the specified launch has been removed. |
void |
removeDebugTarget(IDebugTarget target)
Removes the given debug target from this launch. |
void |
removeProcess(IProcess process)
Removes the given process from this launch. |
void |
setAttribute(String key,
String value)
Sets the value of a client defined attribute. |
void |
setSourceLocator(ISourceLocator sourceLocator)
Sets the source locator to use for locating source elements for the debug target associated with this launch, or null
if source lookup is not supported. |
void |
terminate()
Causes this element to terminate, generating a TERMINATE event.
|
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Constructor Detail |
public Launch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator)
launchConfiguration
- the configuration that was launchedmode
- the mode of this launch - run or debug (constants
defined by ILaunchManager
)locator
- the source locator to use for this debug session, or
null
if not supportedMethod Detail |
public final boolean canTerminate()
ITerminate
canTerminate
in interface ITerminate
ITerminate.canTerminate()
public final Object[] getChildren()
ILaunch
getChildren
in interface ILaunch
IDebugTarget
or IProcess
),
or an empty arrayILaunch.getChildren()
public final IDebugTarget getDebugTarget()
ILaunch
null
if no debug target is associated with this launch. All debug targets
associated with this launch may be retrieved by
getDebugTargets()
.
getDebugTarget
in interface ILaunch
null
ILaunch.getDebugTarget()
public final IProcess[] getProcesses()
ILaunch
getProcesses
in interface ILaunch
ILaunch.getProcesses()
protected List getProcesses0()
public final ISourceLocator getSourceLocator()
ILaunch
null
if source lookup is not supported.
getSourceLocator
in interface ILaunch
ILaunch.getSourceLocator()
public final void setSourceLocator(ISourceLocator sourceLocator)
ILaunch
null
if source lookup is not supported.
setSourceLocator
in interface ILaunch
sourceLocator
- source locator or null
ILaunch.setSourceLocator(ISourceLocator)
public final boolean isTerminated()
ITerminate
isTerminated
in interface ITerminate
ITerminate.isTerminated()
public final void terminate() throws DebugException
ITerminate
TERMINATE
event.
Implementations may be blocking or non-blocking.
terminate
in interface ITerminate
DebugException
- on failure. Reasons include:ITerminate.terminate()
public final String getLaunchMode()
ILaunch
getLaunchMode
in interface ILaunch
ILaunch.getLaunchMode()
public ILaunchConfiguration getLaunchConfiguration()
ILaunch
null
if no configuration was launched.
getLaunchConfiguration
in interface ILaunch
null
ILaunch.getLaunchConfiguration()
public void setAttribute(String key, String value)
ILaunch
setAttribute
in interface ILaunch
key
- the attribute keyvalue
- the attribute valueILaunch.setAttribute(String, String)
public String getAttribute(String key)
ILaunch
getAttribute
in interface ILaunch
key
- the attribute key
null
if undefinedILaunch.getAttribute(String)
public IDebugTarget[] getDebugTargets()
ILaunch
getDebugTargets
in interface ILaunch
ILaunch.getDebugTargets()
protected List getDebugTargets0()
public final void addDebugTarget(IDebugTarget target)
ILaunch
addDebugTarget
in interface ILaunch
target
- debug target to add to this launchILaunch.addDebugTarget(IDebugTarget)
public final void removeDebugTarget(IDebugTarget target)
ILaunch
removeDebugTarget
in interface ILaunch
target
- debug target to remove from this launchILaunch.removeDebugTarget(IDebugTarget)
public final void addProcess(IProcess process)
ILaunch
addProcess
in interface ILaunch
process
- the process to add to this launchILaunch.addProcess(IProcess)
public final void removeProcess(IProcess process)
ILaunch
removeProcess
in interface ILaunch
process
- the process to remove from this launchILaunch.removeProcess(IProcess)
protected void addProcesses(IProcess[] processes)
processes
- processes to addprotected void fireChanged()
protected void fireTerminate()
public boolean hasChildren()
ILaunch
hasChildren
in interface ILaunch
ILaunch.hasChildren()
public boolean canDisconnect()
IDisconnect
canDisconnect
in interface IDisconnect
IDisconnect.canDisconnect()
public void disconnect() throws DebugException
IDisconnect
disconnect
in interface IDisconnect
DebugException
- on failure. Reasons include:IDisconnect.disconnect()
public boolean isDisconnected()
IDisconnect
isDisconnected
in interface IDisconnect
IDisconnect.isDisconnected()
public void launchRemoved(ILaunch launch)
ILaunchListener
launchRemoved
in interface ILaunchListener
launch
- the removed launchprotected ILaunchManager getLaunchManager()
public void launchAdded(ILaunch launch)
ILaunchListener
launchAdded
in interface ILaunchListener
launch
- the newly added launchpublic void launchChanged(ILaunch launch)
ILaunchListener
launchChanged
in interface ILaunchListener
launch
- the changed launchpublic void launchConfigurationAdded(ILaunchConfiguration configuration)
ILaunchConfigurationListener
launchConfigurationAdded
in interface ILaunchConfigurationListener
configuration
- the newly created launch configurationpublic void launchConfigurationChanged(ILaunchConfiguration configuration)
ILaunchConfigurationListener
launchConfigurationChanged
in interface ILaunchConfigurationListener
configuration
- the launch configuration that has
changedpublic void launchConfigurationRemoved(ILaunchConfiguration configuration)
ILaunchConfigurationListener
launchConfigurationRemoved
in interface ILaunchConfigurationListener
configuration
- the deleted launch configurationpublic void handleDebugEvents(DebugEvent[] events)
IDebugEventSetListener
handleDebugEvents
in interface IDebugEventSetListener
events
- the debug events
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.