Package org.eclipse.jdt.debug.core
Interface IJavaBreakpointListener
-
public interface IJavaBreakpointListenerProvides event and error notification for Java breakpoints. Listeners register with theJDIDebugModel.Since 3.5, clients can also register breakpoint listeners using the
org.eclipse.jdt.debug.breakpointListenersextension 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:
JDIDebugModel,IJavaBreakpoint
-
-
Field Summary
Fields Modifier and Type Field Description static intDONT_CAREReturn code indicating that this listener should not be considered in a vote to suspend a thread or install a breakpoint.static intDONT_INSTALLReturn code in response to an "installing" notification, indicating a vote to not install the associated breakpoint.static intDONT_SUSPENDReturn code in response to a "breakpoint hit" notification, indicating a vote to not suspend (i.e. resume) the associated thread.static intINSTALLReturn code in response to an "installing" notification, indicating a vote to install the associated breakpoint.static intSUSPENDReturn code in response to a "breakpoint hit" notification, indicating a vote to suspend the associated thread.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint)Notification that the given breakpoint is about to be added to the specified target.voidbreakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint, Message[] errors)Notification that the given breakpoint has compilation errors in its conditional expression.voidbreakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, DebugException exception)Notification that the given breakpoint had runtime errors in its conditional expression.intbreakpointHit(IJavaThread thread, IJavaBreakpoint breakpoint)Notification that the given breakpoint has been hit in the specified thread.voidbreakpointInstalled(IJavaDebugTarget target, IJavaBreakpoint breakpoint)Notification that the given breakpoint has been installed in the specified target.voidbreakpointRemoved(IJavaDebugTarget target, IJavaBreakpoint breakpoint)Notification that the given breakpoint has been removed from the specified target.intinstallingBreakpoint(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 Detail
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
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 targetbreakpoint- 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 toINSTALL, the breakpoint will be installed. If there are no votes to install the breakpoint, there must be at least oneDONT_INSTALLvote 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 ornullif 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
void breakpointInstalled(IJavaDebugTarget target, IJavaBreakpoint breakpoint)
Notification that the given breakpoint has been installed in the specified target.- Parameters:
target- Java debug targetbreakpoint- 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 toSUSPEND, the thread will suspend. If there are no votes to suspend the thread, there must be at least oneDONT_SUSPENDvote 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
void breakpointRemoved(IJavaDebugTarget target, IJavaBreakpoint breakpoint)
Notification that the given breakpoint has been removed from the specified target.- Parameters:
target- Java debug targetbreakpoint- Java breakpoint
-
breakpointHasRuntimeException
void breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, 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
void breakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint, Message[] errors)
Notification that the given breakpoint has compilation errors in its conditional expression.- Parameters:
breakpoint- the breakpointerrors- the compilation errors in the breakpoint's condition
-
-