# Java Breakpoint Listeners

###### Identifier:

org.eclipse.jdt.debug.breakpointListeners

###### Since:

3.5

###### Description:

Allow clients to contribute listeners for Java breakpoint notifications. For example, listeners are called when a breakpoint is hit and about to suspend execution. The listener can vote to resume or suspend the debug session. Listeners can be programmatically added to and removed from specific Java breakpoints (specified by breakpoint listener identifers), or be registered to listen for notifications for all Java breakpoints.

###### Configuration Markup:

<!ELEMENT extension (breakpointListener)+>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

<!ELEMENT breakpointListener EMPTY>

<!ATTLIST breakpointListener

id IDREF #REQUIRED

class CDATA #REQUIRED

filter (*) >

- id - Unique identifier of the breakpoint listener
- class - Delegate for breakpoint notifications - must be an instance of `IJavaBreakpointListener`
- filter - Controls whether the breakpoint listener is notified for all breakpoints. Currently, the only option allowed is "*" indicating all breakpoints. When unspecified, listeners must be added to breakpoints programmatically via their `id`.

###### Examples:

The following is an example for defining a breakpoint listener. In this example, the listener is only notified of breakpoint events for the specific breakpoints it is programatically registered for.

    <extension
           point="org.eclipse.jdt.debug.breakpointListeners">
       <breakpointActionDelegate
              class="com.example.BreakpointActionDelegate"
              id="com.example.breakpoint.action">
        </breakpointActionDelegate>
    </extension>

###### API Information:

- Value of the attribute class in a breakpointListener element must be a fully qualifed name of a Java class that implements org.eclipse.jdt.debug.core.IJavaBreakpointListener.
- Listeners are added to and removed from a breakpoint programmatically. See `IJavaBreakpoint.addBreakpointListener(String id)` and `IJavaBreakpoint.removeBreakpointListener(String id)`

###### Supplied Implementation:

None

Copyright (c) 2009 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0