Package org.eclipse.debug.core.model
Class Breakpoint
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.debug.core.model.Breakpoint
- All Implemented Interfaces:
IAdaptable,IBreakpoint,ITriggerPoint
- Direct Known Subclasses:
LineBreakpoint
Abstract implementation of a breakpoint. This class is
intended to be sub-classed by implementations
of breakpoints.
- Since:
- 2.0
- See Also:
-
Field Summary
Fields inherited from interface org.eclipse.debug.core.model.IBreakpoint
BREAKPOINT_MARKER, ENABLED, ID, LINE_BREAKPOINT_MARKER, PERSISTED, REGISTEREDFields inherited from interface org.eclipse.debug.core.model.ITriggerPoint
TRIGGERPOINT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes this breakpoint's underlying marker, and removes this breakpoint from the breakpoint manager.protected IMarkerReturns the marker associated with this breakpoint.booleanReturns the marker associated with this breakpoint, ornullif no marker is associated with this breakpoint.protected ISchedulingRuleReturns a scheduling rule to use when modifying or deleting this breakpoint's marker, possiblynull.protected ISchedulingRulegetMarkerRule(IResource resource) Returns a scheduling rule to use when modifying markers on the given resource, possiblynull.inthashCode()booleanReturns whether this breakpoint is enabledbooleanReturns whether this breakpoint is to be persisted across workspace invocations, or when a project is closed and re-opened.booleanReturns whether this breakpoint is currently registered with the breakpoint manager.booleanReturns whether this breakpoint is defined as a trigger point in the workspace.protected booleanReturns whether this breakpoint has an associated marker that exists.protected voidrun(ISchedulingRule rule, IWorkspaceRunnable wr) Execute the given workspace runnable with the scheduling rule to use when running the operation.protected voidsetAttribute(String attributeName, boolean value) Convenience method to set the given boolean attribute of this breakpoint's underlying marker in a workspace runnable.protected voidsetAttribute(String attributeName, int value) Convenience method to set the given integer attribute of this breakpoint's underlying marker in a workspace runnable.protected voidsetAttribute(String attributeName, Object value) Convenience method to set the given attribute of this breakpoint's underlying marker in a workspace runnable.protected voidsetAttributes(String[] attributeNames, Object[] values) Convenience method to set the given attributes of this breakpoint's underlying marker in a workspace runnable.protected voidsetAttributes(Map<String, ? extends Object> attributes) Convenience method to set the attributes of this breakpoint's underlying marker in a workspace runnable.voidsetEnabled(boolean enabled) Sets the enabled state of this breakpoint.voidSets the marker associated with this breakpoint.voidsetPersisted(boolean persisted) Sets whether this breakpoint is to be persisted across workspace invocations, or when a project is closed and re-opened.voidsetRegistered(boolean registered) Sets whether this breakpoint is currently registered with the breakpoint manager.voidsetTriggerPoint(boolean triggerPoint) Sets whether this breakpoint is to be treated as a trigger point for the workspace.toString()Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.debug.core.model.IBreakpoint
getModelIdentifier
-
Constructor Details
-
Breakpoint
public Breakpoint()Creates a breakpoint.- Since:
- 3.8
-
-
Method Details
-
setMarker
Description copied from interface:IBreakpointSets the marker associated with this breakpoint. This method is called once at breakpoint creation.- Specified by:
setMarkerin interfaceIBreakpoint- Parameters:
marker- the marker to associate with this breakpoint- Throws:
CoreException- if an error occurs accessing the marker- See Also:
-
equals
-
hashCode
public int hashCode() -
setEnabled
Description copied from interface:IBreakpointSets the enabled state of this breakpoint. This has no effect if the current enabled state is the same as specified by the enabled parameter.- Specified by:
setEnabledin interfaceIBreakpoint- Parameters:
enabled- whether this breakpoint should be enabled- Throws:
CoreException- if unable to set the associated attribute on this breakpoint's underlying marker.- See Also:
-
isEnabled
Description copied from interface:IBreakpointReturns whether this breakpoint is enabled- Specified by:
isEnabledin interfaceIBreakpoint- Returns:
- whether this breakpoint is enabled
- Throws:
CoreException- if unable to access the associated attribute from this breakpoint's underlying marker- See Also:
-
isRegistered
Description copied from interface:IBreakpointReturns whether this breakpoint is currently registered with the breakpoint manager.- Specified by:
isRegisteredin interfaceIBreakpoint- Returns:
- whether this breakpoint is currently registered with the breakpoint manager
- Throws:
CoreException- if unable to access the associated attribute on this breakpoint's underlying marker- See Also:
-
setRegistered
Description copied from interface:IBreakpointSets whether this breakpoint is currently registered with the breakpoint manager.- Specified by:
setRegisteredin interfaceIBreakpoint- Parameters:
registered- whether this breakpoint is registered with the breakpoint manager- Throws:
CoreException- if unable to set the associated attribute on this breakpoint's underlying marker.- See Also:
-
delete
Description copied from interface:IBreakpointDeletes this breakpoint's underlying marker, and removes this breakpoint from the breakpoint manager.- Specified by:
deletein interfaceIBreakpoint- Throws:
CoreException- if unable to delete this breakpoint's underlying marker- See Also:
-
getMarker
Description copied from interface:IBreakpointReturns the marker associated with this breakpoint, ornullif no marker is associated with this breakpoint.- Specified by:
getMarkerin interfaceIBreakpoint- Returns:
- associated marker, or
nullif there is no associated marker. - See Also:
-
isPersisted
Description copied from interface:IBreakpointReturns whether this breakpoint is to be persisted across workspace invocations, or when a project is closed and re-opened. Since marker definitions only allow all/none of a specific type of marker to be persisted (rather than selected markers of a specific type), breakpoints define this functionality.- Specified by:
isPersistedin interfaceIBreakpoint- Returns:
- whether this breakpoint is to be persisted
- Throws:
CoreException- if unable to access the associated attribute on this breakpoint's underlying marker- See Also:
-
setPersisted
Description copied from interface:IBreakpointSets whether this breakpoint is to be persisted across workspace invocations, or when a project is closed and re-opened. Has no effect if this breakpoint's marker definition is defined as not persisted. Sets the underlyingTRANSIENTattribute on this breakpoint's marker totrue.- Specified by:
setPersistedin interfaceIBreakpoint- Parameters:
persisted- whether this breakpoint is to be persisted across workspace invocations- Throws:
CoreException- if unable to set the associated attribute on this breakpoint's underlying marker.- See Also:
-
isTriggerPoint
Description copied from interface:ITriggerPointReturns whether this breakpoint is defined as a trigger point in the workspace.- Specified by:
isTriggerPointin interfaceITriggerPoint- Returns:
- whether this breakpoint is a trigger point
- Throws:
CoreException- if unable to access the associated attribute on this breakpoint's underlying marker- Since:
- 3.11
- See Also:
-
setTriggerPoint
Description copied from interface:ITriggerPointSets whether this breakpoint is to be treated as a trigger point for the workspace. If it is a trigger point, then theITriggerPointattribute on this breakpoint's marker is set totrue.- Specified by:
setTriggerPointin interfaceITriggerPoint- Parameters:
triggerPoint- whether this breakpoint is to be treated as trigger point for the workspace- Throws:
CoreException- if unable to set the associated attribute on this breakpoint's underlying marker.- Since:
- 3.11
- See Also:
-
setAttribute
Convenience method to set the given boolean attribute of this breakpoint's underlying marker in a workspace runnable. Setting marker attributes in a workspace runnable prevents deadlock.- Parameters:
attributeName- attribute namevalue- attribute value- Throws:
CoreException- is setting the attribute fails- See Also:
-
setAttribute
Convenience method to set the given integer attribute of this breakpoint's underlying marker in a workspace runnable. Setting marker attributes in a workspace runnable prevents deadlock.- Parameters:
attributeName- attribute namevalue- attribute value- Throws:
CoreException- is setting the attribute fails- See Also:
-
setAttribute
Convenience method to set the given attribute of this breakpoint's underlying marker in a workspace runnable. Setting marker attributes in a workspace runnable prevents deadlock.- Parameters:
attributeName- attribute namevalue- attribute value- Throws:
CoreException- is setting the attribute fails- See Also:
-
setAttributes
Convenience method to set the given attributes of this breakpoint's underlying marker in a workspace runnable. Setting marker attributes in a workspace runnable prevents deadlock.- Parameters:
attributeNames- attribute namesvalues- attribute values- Throws:
CoreException- is setting the attributes fails- See Also:
-
setAttributes
Convenience method to set the attributes of this breakpoint's underlying marker in a workspace runnable. Setting marker attributes in a workspace runnable prevents deadlock.- Parameters:
attributes- attribute map- Throws:
CoreException- is setting the attributes fails- See Also:
-
ensureMarker
Returns the marker associated with this breakpoint.- Returns:
- breakpoint marker
- Throws:
DebugException- if no marker is associated with this breakpoint or the associated marker does not exist
-
markerExists
protected boolean markerExists()Returns whether this breakpoint has an associated marker that exists.- Returns:
- returns whether this breakpoint has an associated marker that exists
- Since:
- 2.1
-
getMarkerRule
Returns a scheduling rule to use when modifying markers on the given resource, possiblynull.- Parameters:
resource- a resource on which a marker will be created, modified, or deleted- Returns:
- a scheduling rule to use when modifying markers on the given resource
possibly
null - Since:
- 3.1
-
getMarkerRule
Returns a scheduling rule to use when modifying or deleting this breakpoint's marker, possiblynull. This method is only valid when this breakpoint's marker has already been created. When creating a marker on a specific resource, usegetMarkerRule(IResource)instead.- Returns:
- a scheduling rule to use when modifying or deleting this breakpoint's marker
- Since:
- 3.1
-
run
Execute the given workspace runnable with the scheduling rule to use when running the operation.- Parameters:
rule- the rule to use when running the operationwr- the runnable operation- Throws:
DebugException- If a core exception occurs performing the operation- Since:
- 3.1
-
toString
-