Eclipse Platform
2.0

org.eclipse.debug.core
Interface IBreakpointManager


public interface IBreakpointManager

The breakpoint manager manages the collection of breakpoints in the workspace. A breakpoint suspends the execution of a program being debugged. The kinds of breakpoints supported by each debug architecture and the information required to create those breakpoints is defined by each debug architecture. Breakpoint creation is a client responsibility.

Clients interested in breakpoint change notification may register with the breakpoint manager - see IBreakpointListener.

This interface is not intended to be implemented by clients.

See Also:
IBreakpointListener

Method Summary
 void addBreakpoint(IBreakpoint breakpoint)
          Adds the given breakpoint to the collection of registered breakpoints in the workspace and notifies all registered listeners.
 void addBreakpointListener(IBreakpointListener listener)
          Adds the given listener to the collection of registered breakpoint listeners.
 void fireBreakpointChanged(IBreakpoint breakpoint)
          Notifies all registered listeners that the given breakpoint has changed.
 IBreakpoint getBreakpoint(IMarker marker)
          Returns the breakpoint associated with the given marker or null if no such breakpoint exists
 IBreakpoint[] getBreakpoints()
          Returns a collection of all registered breakpoints.
 IBreakpoint[] getBreakpoints(String modelIdentifier)
          Returns a collection of all breakpoints registered for the given debug model.
 boolean hasBreakpoints()
          Returns whether there are any registered breakpoints.
 boolean isRegistered(IBreakpoint breakpoint)
          Returns whether the given breakpoint is currently registered with this breakpoint manager.
 void removeBreakpoint(IBreakpoint breakpoint, boolean delete)
          Removes the given breakpoint from the breakpoint manager, deletes the marker associated with the breakpoint if the delete flag is true, and notifies all registered listeners.
 void removeBreakpointListener(IBreakpointListener listener)
          Removes the given listener from the collection of registered breakpoint listeners.
 

Method Detail

addBreakpoint

public void addBreakpoint(IBreakpoint breakpoint)
                   throws CoreException
Adds the given breakpoint to the collection of registered breakpoints in the workspace and notifies all registered listeners. This has no effect if the given breakpoint is already registered.

Parameters:
breakpoint - the breakpoint to add
Throws:
DebugException - if adding fails. Reasons include:
  • CONFIGURATION_INVALID - the required MODEL_IDENTIFIER attribute is not set on the breakpoint marker.
  • A CoreException occurred while verifying the MODEL_IDENTIFIER attribute.
CoreException
Since:
2.0

getBreakpoint

public IBreakpoint getBreakpoint(IMarker marker)
Returns the breakpoint associated with the given marker or null if no such breakpoint exists

Parameters:
marker - the marker
Returns:
the breakpoint associated with the marker or null if none exists
Since:
2.0

getBreakpoints

public IBreakpoint[] getBreakpoints()
Returns a collection of all registered breakpoints. Returns an empty array if no breakpoints are registered.

Returns:
an array of breakpoints
Since:
2.0

hasBreakpoints

public boolean hasBreakpoints()
Returns whether there are any registered breakpoints.

Returns:
whether there are any registered breakpoints
Since:
2.0

getBreakpoints

public IBreakpoint[] getBreakpoints(String modelIdentifier)
Returns a collection of all breakpoints registered for the given debug model. Answers an empty array if no breakpoints are registered for the given debug model.

Parameters:
modelIdentifier - identifier of a debug model plug-in
Returns:
an array of breakpoints
Since:
2.0

isRegistered

public boolean isRegistered(IBreakpoint breakpoint)
Returns whether the given breakpoint is currently registered with this breakpoint manager.

Returns:
whether the breakpoint is registered
Since:
2.0

fireBreakpointChanged

public void fireBreakpointChanged(IBreakpoint breakpoint)
Notifies all registered listeners that the given breakpoint has changed. Has no effect if the given breakpoint is not currently registered. This method is intended to be used when a breakpoint attribute is changed that does not alter the breakpoint's underlying marker, that is, when notification will not occur via the marker delta mechanism.

Parameters:
breakpoint - the breakpoint that has changed.
Since:
2.0

removeBreakpoint

public void removeBreakpoint(IBreakpoint breakpoint,
                             boolean delete)
                      throws CoreException
Removes the given breakpoint from the breakpoint manager, deletes the marker associated with the breakpoint if the delete flag is true, and notifies all registered listeners. Has no effect if the given breakpoint is not currently registered.

Parameters:
breakpoint - the breakpoint to remove
delete - whether to delete the marker associated with the breakpoint
Throws:
CoreException - if an exception occurs while deleting the underlying marker.
Since:
2.0

addBreakpointListener

public void addBreakpointListener(IBreakpointListener listener)
Adds the given listener to the collection of registered breakpoint listeners. Has no effect if an identical listener is already registered.

Parameters:
listener - the listener to add

removeBreakpointListener

public void removeBreakpointListener(IBreakpointListener listener)
Removes the given listener from the collection of registered breakpoint listeners. Has no effect if an identical listener is not already registered.

Parameters:
listener - the listener to remove

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.