public abstract class DebugElement extends PlatformObject implements IDebugElement
Clients may subclass this class.
Constructor and Description |
---|
DebugElement(IDebugTarget target)
Constructs a debug element referring to an artifact in the given
debug target.
|
Modifier and Type | Method and Description |
---|---|
void |
fireChangeEvent(int detail)
Fires a change event for this debug element
with the specified detail code.
|
void |
fireCreationEvent()
Fires a creation event for this debug element.
|
void |
fireEvent(DebugEvent event)
Fires a debug event.
|
void |
fireResumeEvent(int detail)
Fires a resume for this debug element with
the specified detail code.
|
void |
fireSuspendEvent(int detail)
Fires a suspend event for this debug element with
the specified detail code.
|
void |
fireTerminateEvent()
Fires a terminate event for this debug element.
|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class
associated with this object.
|
IDebugTarget |
getDebugTarget()
Returns the debug target this element is contained in.
|
ILaunch |
getLaunch()
Returns the launch this element is contained in.
|
protected void |
notSupported(String message,
Throwable e)
Throws a debug exception with a status code of
NOT_SUPPORTED . |
protected void |
requestFailed(String message,
Throwable e)
Throws a debug exception with a status code of
TARGET_REQUEST_FAILED . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModelIdentifier
public DebugElement(IDebugTarget target)
target
- debug target containing this elementpublic IDebugTarget getDebugTarget()
IDebugElement
getDebugTarget
in interface IDebugElement
public ILaunch getLaunch()
IDebugElement
getLaunch
in interface IDebugElement
public <T> T getAdapter(Class<T> adapter)
PlatformObject
null
if
no such object can be found.
This implementation of the method declared by IAdaptable
passes the request along to the platform's adapter manager; roughly
Platform.getAdapterManager().getAdapter(this, adapter)
.
Subclasses may override this method (however, if they do so, they
should invoke the method on their superclass to ensure that the
Platform's adapter manager is consulted).
getAdapter
in interface IAdaptable
getAdapter
in class PlatformObject
adapter
- the class to adapt tonull
IAdaptable.getAdapter(Class)
public void fireEvent(DebugEvent event)
event
- debug event to firepublic void fireChangeEvent(int detail)
detail
- detail code for the change event,
such as DebugEvent.STATE
or DebugEvent.CONTENT
public void fireCreationEvent()
public void fireResumeEvent(int detail)
detail
- detail code for the resume event, such
as DebugEvent.STEP_OVER
public void fireSuspendEvent(int detail)
detail
- detail code for the suspend event, such
as DebugEvent.BREAKPOINT
public void fireTerminateEvent()
protected void requestFailed(String message, Throwable e) throws DebugException
TARGET_REQUEST_FAILED
.message
- exception messagee
- underlying exception or null
DebugException
- if a problem is encounteredprotected void notSupported(String message, Throwable e) throws DebugException
NOT_SUPPORTED
.message
- exception messagee
- underlying exception or null
DebugException
- if a problem is encountered
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.