Interface IJavaBreakpointListener


public interface IJavaBreakpointListener
Provides event and error notification for Java breakpoints. Listeners register with the JDIDebugModel.

Since 3.5, clients can also register breakpoint listeners using the org.eclipse.jdt.debug.breakpointListeners extension point. A listener can be contributed to receive notifications from all Java breakpoints or receive notifications about specific breakpoints by programmatically registering the extension with a breakpoint.

Clients are intended to implement this interface.

Since:
2.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Return code indicating that this listener should not be considered in a vote to suspend a thread or install a breakpoint.
    static final int
    Return code in response to an "installing" notification, indicating a vote to not install the associated breakpoint.
    static final int
    Return code in response to a "breakpoint hit" notification, indicating a vote to not suspend (i.e. resume) the associated thread.
    static final int
    Return code in response to an "installing" notification, indicating a vote to install the associated breakpoint.
    static final int
    Return code in response to a "breakpoint hit" notification, indicating a vote to suspend the associated thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notification that the given breakpoint is about to be added to the specified target.
    void
    Notification that the given breakpoint has compilation errors in its conditional expression.
    void
    breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, org.eclipse.debug.core.DebugException exception)
    Notification that the given breakpoint had runtime errors in its conditional expression.
    int
    Notification that the given breakpoint has been hit in the specified thread.
    void
    Notification that the given breakpoint has been installed in the specified target.
    void
    Notification that the given breakpoint has been removed from the specified target.
    int
    Notification that the given breakpoint is about to be installed in the specified target, in the specified type.
  • Field Details

    • SUSPEND

      static final int SUSPEND
      Return code in response to a "breakpoint hit" notification, indicating a vote to suspend the associated thread.
      Since:
      3.0
      See Also:
    • DONT_SUSPEND

      static final int DONT_SUSPEND
      Return code in response to a "breakpoint hit" notification, indicating a vote to not suspend (i.e. resume) the associated thread.
      Since:
      3.0
      See Also:
    • INSTALL

      static final int INSTALL
      Return code in response to an "installing" notification, indicating a vote to install the associated breakpoint.
      Since:
      3.0
      See Also:
    • DONT_INSTALL

      static final int DONT_INSTALL
      Return code in response to an "installing" notification, indicating a vote to not install the associated breakpoint.
      Since:
      3.0
      See Also:
    • DONT_CARE

      static final int DONT_CARE
      Return code indicating that this listener should not be considered in a vote to suspend a thread or install a breakpoint.
      Since:
      3.0
      See Also:
  • Method Details

    • addingBreakpoint

      void addingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint)
      Notification that the given breakpoint is about to be added to the specified target. This message is sent before the breakpoint is actually added to the debut target (i.e. this is a pre-notification).
      Parameters:
      target - Java debug target
      breakpoint - Java breakpoint
    • installingBreakpoint

      int installingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint, IJavaType type)
      Notification that the given breakpoint is about to be installed in the specified target, in the specified type. Allows this listener to vote to determine if the given breakpoint should be installed in the specified type and target. If at least one listener votes to INSTALL, the breakpoint will be installed. If there are no votes to install the breakpoint, there must be at least one DONT_INSTALL vote to cancel the installation. If all listeners vote DONT_CARE, the breakpoint will be installed by default.
      Parameters:
      target - Java debug target
      breakpoint - Java breakpoint
      type - the type (class or interface) the breakpoint is about to be installed in or null if the given breakpoint is not installed in a specific type (one of IJavaClassType, IJavaInterfaceType, or IJavaArrayType)
      Returns:
      whether the the breakpoint should be installed in the given type and target, or whether this listener doesn't care - one of INSTALL, DONT_INSTALL, or DONT_CARE
      Since:
      3.0
    • breakpointInstalled

      void breakpointInstalled(IJavaDebugTarget target, IJavaBreakpoint breakpoint)
      Notification that the given breakpoint has been installed in the specified target.
      Parameters:
      target - Java debug target
      breakpoint - Java breakpoint
    • breakpointHit

      int breakpointHit(IJavaThread thread, IJavaBreakpoint breakpoint)
      Notification that the given breakpoint has been hit in the specified thread. Allows this listener to vote to determine if the given thread should be suspended in response to the breakpoint. If at least one listener votes to SUSPEND, the thread will suspend. If there are no votes to suspend the thread, there must be at least one DONT_SUSPEND vote to avoid the suspension (resume). If all listeners vote DONT_CARE, the thread will suspend by default.

      The thread the breakpoint has been encountered in is now suspended. Listeners may query thread state and perform evaluations. All subsequent breakpoints in this thread will be ignored until voting has completed.

      Parameters:
      thread - Java thread
      breakpoint - Java breakpoint
      Returns:
      whether the thread should suspend or whether this listener doesn't care - one of SUSPEND, DONT_SUSPEND, or DONT_CARE
      Since:
      3.0
    • breakpointRemoved

      void breakpointRemoved(IJavaDebugTarget target, IJavaBreakpoint breakpoint)
      Notification that the given breakpoint has been removed from the specified target.
      Parameters:
      target - Java debug target
      breakpoint - Java breakpoint
    • breakpointHasRuntimeException

      void breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, org.eclipse.debug.core.DebugException exception)
      Notification that the given breakpoint had runtime errors in its conditional expression.
      Parameters:
      breakpoint - the breakpoint
      exception - the debug exception that occurred evaluating the breakpoint's condition
    • breakpointHasCompilationErrors

      void breakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint, Message[] errors)
      Notification that the given breakpoint has compilation errors in its conditional expression.
      Parameters:
      breakpoint - the breakpoint
      errors - the compilation errors in the breakpoint's condition