public abstract class Breakpoint extends PlatformObject implements IBreakpoint, ITriggerPoint
IBreakpoint
BREAKPOINT_MARKER, ENABLED, ID, LINE_BREAKPOINT_MARKER, PERSISTED, REGISTERED
TRIGGERPOINT
Constructor and Description |
---|
Breakpoint()
Creates a breakpoint.
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes this breakpoint's underlying marker, and removes
this breakpoint from the breakpoint manager.
|
protected IMarker |
ensureMarker()
Returns the marker associated with this breakpoint.
|
boolean |
equals(Object item) |
IMarker |
getMarker()
Returns the marker associated with this breakpoint, or
null if no marker is associated with this breakpoint. |
protected ISchedulingRule |
getMarkerRule()
Returns a scheduling rule to use when modifying or deleting this breakpoint's marker,
possibly
null . |
protected ISchedulingRule |
getMarkerRule(IResource resource)
Returns a scheduling rule to use when modifying markers on the given resource,
possibly
null . |
int |
hashCode() |
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.
|
boolean |
isTriggerPoint()
Returns whether this breakpoint is defined as a trigger point in the
workspace.
|
protected boolean |
markerExists()
Returns whether this breakpoint has an associated marker that exists.
|
protected void |
run(ISchedulingRule rule,
IWorkspaceRunnable wr)
Execute the given workspace runnable with the scheduling rule to use when running the operation.
|
protected void |
setAttribute(String attributeName,
boolean value)
Convenience method to set the given boolean attribute of this
breakpoint's underlying marker in a workspace runnable.
|
protected void |
setAttribute(String attributeName,
int value)
Convenience method to set the given integer attribute of
this breakpoint's underlying marker in a workspace
runnable.
|
protected void |
setAttribute(String attributeName,
Object value)
Convenience method to set the given attribute of
this breakpoint's underlying marker in a workspace
runnable.
|
protected void |
setAttributes(Map<String,? extends Object> attributes)
Convenience method to set the attributes of
this breakpoint's underlying marker in a workspace
runnable.
|
protected void |
setAttributes(String[] attributeNames,
Object[] values)
Convenience method to set the given attributes of
this breakpoint's underlying marker in a workspace
runnable.
|
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 persisted)
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.
|
void |
setTriggerPoint(boolean triggerPoint)
Sets whether this breakpoint is to be treated as a trigger point for the
workspace.
|
getAdapter
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getModelIdentifier
getAdapter
public void setMarker(IMarker marker) throws CoreException
IBreakpoint
setMarker
in interface IBreakpoint
marker
- the marker to associate with this breakpointCoreException
- if an error occurs accessing the markerIBreakpoint.setMarker(IMarker)
public boolean equals(Object item)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void setEnabled(boolean enabled) throws CoreException
IBreakpoint
setEnabled
in interface IBreakpoint
enabled
- whether this breakpoint should be enabledCoreException
- if unable to set the associated attribute on
this breakpoint's underlying marker.IBreakpoint.setEnabled(boolean)
public boolean isEnabled() throws CoreException
IBreakpoint
isEnabled
in interface IBreakpoint
CoreException
- if unable to access the associated
attribute from this breakpoint's underlying markerIBreakpoint.isEnabled()
public boolean isRegistered() throws CoreException
IBreakpoint
isRegistered
in interface IBreakpoint
CoreException
- if unable to access the associated
attribute on this breakpoint's underlying markerIBreakpoint.isRegistered()
public void setRegistered(boolean registered) throws CoreException
IBreakpoint
setRegistered
in interface IBreakpoint
registered
- whether this breakpoint is registered with the
breakpoint managerCoreException
- if unable to set the associated attribute
on this breakpoint's underlying marker.IBreakpoint.setRegistered(boolean)
public void delete() throws CoreException
IBreakpoint
delete
in interface IBreakpoint
CoreException
- if unable to delete this breakpoint's
underlying markerIBreakpoint.delete()
public IMarker getMarker()
IBreakpoint
null
if no marker is associated with this breakpoint.getMarker
in interface IBreakpoint
null
if there is
no associated marker.IBreakpoint.getMarker()
public boolean isPersisted() throws CoreException
IBreakpoint
isPersisted
in interface IBreakpoint
CoreException
- if unable to access the associated attribute
on this breakpoint's underlying markerIBreakpoint.isPersisted()
public void setPersisted(boolean persisted) throws CoreException
IBreakpoint
TRANSIENT
attribute on this
breakpoint's marker to true
.setPersisted
in interface IBreakpoint
persisted
- whether this breakpoint is to be persisted across
workspace invocationsCoreException
- if unable to set the associated attribute on
this breakpoint's underlying marker.IBreakpoint.setPersisted(boolean)
public boolean isTriggerPoint() throws CoreException
ITriggerPoint
isTriggerPoint
in interface ITriggerPoint
CoreException
- if unable to access the associated attribute on
this breakpoint's underlying markerIBreakpoint.isPersisted()
public void setTriggerPoint(boolean triggerPoint) throws CoreException
ITriggerPoint
ITriggerPoint
attribute on this
breakpoint's marker is set to true
.setTriggerPoint
in interface ITriggerPoint
triggerPoint
- whether this breakpoint is to be treated as trigger point
for the workspaceCoreException
- if unable to set the associated attribute on
this breakpoint's underlying marker.ITriggerPoint.setTriggerPoint(boolean)
protected void setAttribute(String attributeName, boolean value) throws CoreException
attributeName
- attribute namevalue
- attribute valueCoreException
- is setting the attribute failsIMarker.setAttribute(java.lang.String, boolean)
protected void setAttribute(String attributeName, int value) throws CoreException
attributeName
- attribute namevalue
- attribute valueCoreException
- is setting the attribute failsIMarker.setAttribute(java.lang.String, int)
protected void setAttribute(String attributeName, Object value) throws CoreException
attributeName
- attribute namevalue
- attribute valueCoreException
- is setting the attribute failsIMarker.setAttribute(java.lang.String, java.lang.Object)
protected void setAttributes(String[] attributeNames, Object[] values) throws CoreException
attributeNames
- attribute namesvalues
- attribute valuesCoreException
- is setting the attributes failsIMarker.setAttributes(java.lang.String[], java.lang.Object[])
protected void setAttributes(Map<String,? extends Object> attributes) throws CoreException
attributes
- attribute mapCoreException
- is setting the attributes failsIMarker.setAttributes(java.util.Map)
protected IMarker ensureMarker() throws DebugException
DebugException
- if no marker is associated with
this breakpoint or the associated marker does not existprotected boolean markerExists()
protected ISchedulingRule getMarkerRule(IResource resource)
null
.resource
- a resource on which a marker will be created, modified, or deletednull
protected ISchedulingRule getMarkerRule()
null
. This method is only valid when this breakpoint's
marker has already been created. When creating a marker on a specific resource,
use getMarkerRule(IResource)
instead.protected void run(ISchedulingRule rule, IWorkspaceRunnable wr) throws DebugException
rule
- the rule to use when running the operationwr
- the runnable operationDebugException
- If a core exception occurs performing the operation
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.