Package org.eclipse.jdt.debug.core
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
Modifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionvoid
addingBreakpoint
(IJavaDebugTarget target, IJavaBreakpoint breakpoint) Notification that the given breakpoint is about to be added to the specified target.void
breakpointHasCompilationErrors
(IJavaLineBreakpoint breakpoint, Message[] errors) 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
breakpointHit
(IJavaThread thread, IJavaBreakpoint breakpoint) Notification that the given breakpoint has been hit in the specified thread.void
breakpointInstalled
(IJavaDebugTarget target, IJavaBreakpoint breakpoint) Notification that the given breakpoint has been installed in the specified target.void
breakpointRemoved
(IJavaDebugTarget target, IJavaBreakpoint breakpoint) Notification that the given breakpoint has been removed from the specified target.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.
-
Field Details
-
SUSPEND
static final int SUSPENDReturn 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_SUSPENDReturn 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 INSTALLReturn 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_INSTALLReturn 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_CAREReturn 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
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 targetbreakpoint
- Java breakpoint
-
installingBreakpoint
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 toINSTALL
, the breakpoint will be installed. If there are no votes to install the breakpoint, there must be at least oneDONT_INSTALL
vote to cancel the installation. If all listeners voteDONT_CARE
, the breakpoint will be installed by default.- Parameters:
target
- Java debug targetbreakpoint
- Java breakpointtype
- the type (class or interface) the breakpoint is about to be installed in ornull
if the given breakpoint is not installed in a specific type (one ofIJavaClassType
,IJavaInterfaceType
, orIJavaArrayType
)- 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
, orDONT_CARE
- Since:
- 3.0
-
breakpointInstalled
Notification that the given breakpoint has been installed in the specified target.- Parameters:
target
- Java debug targetbreakpoint
- Java breakpoint
-
breakpointHit
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 toSUSPEND
, the thread will suspend. If there are no votes to suspend the thread, there must be at least oneDONT_SUSPEND
vote to avoid the suspension (resume). If all listeners voteDONT_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 threadbreakpoint
- Java breakpoint- Returns:
- whether the thread should suspend or whether this listener
doesn't care - one of
SUSPEND
,DONT_SUSPEND
, orDONT_CARE
- Since:
- 3.0
-
breakpointRemoved
Notification that the given breakpoint has been removed from the specified target.- Parameters:
target
- Java debug targetbreakpoint
- 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 breakpointexception
- the debug exception that occurred evaluating the breakpoint's condition
-
breakpointHasCompilationErrors
Notification that the given breakpoint has compilation errors in its conditional expression.- Parameters:
breakpoint
- the breakpointerrors
- the compilation errors in the breakpoint's condition
-