|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A breakpoint is capable of suspending the execution of a program at a specific location when a program is running in debug mode. Each breakpoint has an associated marker which stores and persists all attributes associated with a breakpoint.
A breakpoint is defined in two parts:
"org.eclipse.debug.core.breakpoints"
For example, following is a definition of corresponding breakpoint
and breakpoint marker definitions. Note that the markerType
attribute defined by the breakpoint extension corresponds to the
type of the marker definition.
<extension point="org.eclipse.debug.core.breakpoints"> <breakpoint id="com.example.Breakpoint" class="com.example.Breakpoint" markerType="com.example.BreakpointMarker"> </breakpoint> </extension> <extension point="org.eclipse.core.resources.markers"> <marker id="com.example.BreakpointMarker" super type="org.eclipse.debug.core.breakpointMarker" attribute name ="exampleAttribute"> </marker> </extension>
The breakpoint manager instantiates persisted breakpoints by
traversing all markers that are a subtype of
"org.eclipse.debug.core.breakpointMarker"
, and
instantiating the class defined by the class
attribute
on the associated breakpoint extension. The method setMarker
is then called to associate a marker with the breakpoint.
Breakpoints may or may not be registered with the breakpoint manager, and
are persisted and restored as such. Since marker definitions only allow
all or none of a specific marker type to be persisted, breakpoints define
a PERSISTED
attribute for selective persistence of breakpoints
of the same type.
Field Summary | |
static String |
BREAKPOINT_MARKER
Root breakpoint marker type (value "org.eclipse.debug.core.breakpoint" ). |
static String |
ENABLED
Enabled breakpoint marker attribute (value "org.eclipse.debug.core.enabled" ). |
static String |
ID
Debug model identifier breakpoint marker attribute (value "org.eclipse.debug.core.id" ). |
static String |
LINE_BREAKPOINT_MARKER
Line breakpoint marker type (value "org.eclipse.debug.core.lineBreakpoint" ). |
static String |
PERSISTED
Persisted breakpoint marker attribute (value "org.eclipse.debug.core.persisted" ). |
static String |
REGISTERED
Registered breakpoint marker attribute (value "org.eclipse.debug.core.registered" ). |
Method Summary | |
void |
delete()
Deletes this breakpoint's underlying marker, and removes this breakpoint from the breakpoint manager. |
IMarker |
getMarker()
Returns the marker associated with this breakpoint, or null if no marker is associated with this breakpoint. |
String |
getModelIdentifier()
Returns the identifier of the debug model this breakpoint is associated with. |
boolean |
isEnabled()
Returns whether this breakpoint is enabled |
boolean |
isPersisted()
Returns whether this breakpoint is to be persisted across workspace invocations, or when a project is closed and re-opened. |
boolean |
isRegistered()
Returns whether this breakpoint is currently registered with the breakpoint manager. |
void |
setEnabled(boolean enabled)
Sets the enabled state of this breakpoint. |
void |
setMarker(IMarker marker)
Sets the marker associated with this breakpoint. |
void |
setPersisted(boolean registered)
Sets whether this breakpoint is to be persisted across workspace invocations, or when a project is closed and re-opened. |
void |
setRegistered(boolean registered)
Sets whether this breakpoint is currently registered with the breakpoint manager. |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Field Detail |
public static final String BREAKPOINT_MARKER
"org.eclipse.debug.core.breakpoint"
).
public static final String LINE_BREAKPOINT_MARKER
"org.eclipse.debug.core.lineBreakpoint"
).
public static final String ENABLED
"org.eclipse.debug.core.enabled"
).
The attribute is a boolean
corresponding to the
enabled state of a breakpoint.
IMarker.getAttribute(String, boolean)
,
Constant Field Valuespublic static final String ID
"org.eclipse.debug.core.id"
).
The attribute is a String
corresponding to the
identifier of the debug model a breakpoint is associated with.
public static final String REGISTERED
"org.eclipse.debug.core.registered"
).
The attribute is a boolean
corresponding to
whether a breakpoint has been registered with the breakpoint manager.
IMarker.getAttribute(String, boolean)
,
Constant Field Valuespublic static final String PERSISTED
"org.eclipse.debug.core.persisted"
).
The attribute is a boolean
corresponding to
whether a breakpoint is to be persisted accross workspace
invocations.
IMarker.getAttribute(String, boolean)
,
Constant Field ValuesMethod Detail |
public void delete() throws CoreException
CoreException
- if unable to delete this breakpoint's
underlying markerpublic IMarker getMarker()
null
if no marker is associated with this breakpoint.
null
if there is
no associated marker.public void setMarker(IMarker marker) throws CoreException
marker
- the marker to associate with this breakpoint
CoreException
- if an error occurs accessing the markerpublic String getModelIdentifier()
public boolean isEnabled() throws CoreException
CoreException
- if unable to access the associated
attribute from this breakpoint's underlying markerpublic void setEnabled(boolean enabled) throws CoreException
enabled
- whether this breakpoint should be enabled
CoreException
- if unable to set the associated attribute on
this breakpoint's underlying marker.public boolean isRegistered() throws CoreException
CoreException
- if unable to access the associated
attribute on this breakpoint's underlying markerpublic void setRegistered(boolean registered) throws CoreException
registered
- whether this breakpoint is registered with the
breakpoint manager
CoreException
- if unable to set the associated attribute
on this breakpoint's underlying marker.public boolean isPersisted() throws CoreException
CoreException
- if unable to access the associated attribute
on this breakpoint's underlying markerpublic void setPersisted(boolean registered) throws CoreException
CoreException
- if unable to set the associated attribute on
this breakpoint's underlying marker.
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |