This document lists changes made to the Debugger Core APIs. Please ask on the
nbdev@netbeans.org
mailing list if you have any questions about the details of a
change, or are wondering how to convert existing code to be compatible.
Fuller descriptions of all changes can be found below (follow links).
Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.
ContextProvider
implemented more broadly; DebuggerManager.join
ContextProvider
implemented more broadly; DebuggerManager.join
These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:
OpenIDE-Module-Module-Dependencies: org.netbeans.api.debugger/1 > 1.20
ContextProvider
implemented more broadly; DebuggerManager.join
org.netbeans.api.debugger.ActionsManager
org.netbeans.spi.debugger.ActionsProvider
org.netbeans.api.debugger.ActiveBreakpoints
org.netbeans.api.debugger.Breakpoint
org.netbeans.spi.debugger.BreakpointsActivationProvider
org.netbeans.spi.debugger.ContextAwareService
org.netbeans.spi.debugger.ContextAwareSupport
org.netbeans.api.debugger.DebuggerEngine
ContextProvider
implemented more broadly; DebuggerManager.join
org.netbeans.api.debugger.DebuggerInfo
ContextProvider
implemented more broadly; DebuggerManager.join
org.netbeans.api.debugger.DebuggerManager
ContextProvider
implemented more broadly; DebuggerManager.join
org.netbeans.spi.debugger.DebuggerServiceRegistration
org.netbeans.spi.debugger.DebuggerServiceRegistrations
org.netbeans.api.debugger.Properties
org.netbeans.api.debugger.Session
ContextProvider
implemented more broadly; DebuggerManager.join
org.netbeans.api.debugger.SessionBridge
org.netbeans.api.debugger.Watch
DebuggerManager
Watch
; made by: mentlicher; issues:
#258651
Watch.Pin
base interface introduced as a basis
for specific platform-dependent and location-dependent implementations.
DebuggerManager.createPinnedwatch()
introduced.
ActiveBreakpoints
BreakpointsActivationProvider
; made by: mentlicher; issues:
#242800
ActiveBreakpoints
and SPI interface
BreakpointsActivationProvider
introduced. These classes
handle an activation/deactivation of engine-related breakpoints,
which is independent on their enabled/disabled state.
SessionBridge
; made by: mentlicher; issues:
#246819
SessionBridge
class introduced. This class allows to
suggest that some debug action can be handled by a different debugging
session. The handlers can be registered via implementations of
SessionChanger
interface.
Watch
; made by: mentlicher; issues:
#209783
isEnabled()
and setEnabled(boolean)
.
When the enabled state changes, PROP_ENABLED
event is fired.
Breakpoint
; made by: mentlicher; issues:
#197707
Added methods:
Breakpoint.canHaveDependentBreakpoints()
,
Breakpoint.getBreakpointsToEnable()
,
Breakpoint.setBreakpointsToEnable()
,
Breakpoint.getBreakpointsToDisable()
,
Breakpoint.setBreakpointsToDisable()
.
ActionsManager
; made by: mentlicher; issues:
#191394
Evaluate action is moved from JPDA Debugger into Debugger Core UI module. ActionsManager.ACTION_EVALUATE constant was added for use by debugger-specific provider (ActionsProvider) of Evaluate action.
DebuggerServiceRegistration
DebuggerServiceRegistrations
ActionsProvider
; made by: mentlicher; issues:
#190080
Allow to specify the order of the debugger service registry. For the need of being able to define multiple different registrations for a single instance, @DebuggerServiceRegistrations and ActionsProvider.Registrations annotations are introduced.
Breakpoint
; made by: mentlicher; issues:
#179759
Add Breakpoint.getGroupProperties() method, that returns an implementation of GroupProperties class with the relevant grouping information used by BreakpointsWindow to create hierarchy of breakpoint groups
ActionsManager
; made by: mentlicher; issues:
#180558
ActionsManager.ACTION_NEW_WATCH constant was added for use by session-specific provider of New Watch action. That action invokes an implementation of ActionsProvider that is registered for the active debugger session and contains ActionsManager.ACTION_NEW_WATCH action.
ActionsProvider
; made by: mentlicher; issues:
#177561
ActionsProvider.Registration annotation is enhanced with two additional methods actions() and activateForMIMETypes(). Until a file with the listed MIME type is selected in the IDE, the appropriate actions provider is left disabled for the given list of actions, without instantiating the implementation class.
DebuggerManager
; made by: mentlicher; issues:
#178301
createWatch(int index, String expr) and reorderWatches(int[] permutation)
methods added to DebuggerManager class.
These methods are going to be called from WatchesTreeModel when
watches are reordered.
Properties
; made by: mentlicher; issues:
#158775
Properties.Initializer interface introduced to provide initial values of properties. This is necessary when properties are accessed from more places and it's not practical to copy default values to every such location.
Properties
; made by: mentlicher; issues:
#158907
addPropertyChangeListener() and removePropertyChangeListener() methods added to Properties class.
DebuggerServiceRegistration
ContextAwareService
ContextAwareSupport
; made by: mentlicher; issues:
#153093
#156687
In order to be able to register debugger services on System FileSystem,
which brings more flexibility and better performance (see also
),
we add non-recursive content of org.openide.util.Lookups.forPath()
into debugger lookup.
Since debugger needs retrieve context-aware services from the lookup,
ContextAwareService
interface is introduced.
Annotations are added for easy registration on module layers.
DebuggerServiceRegistration
to register implementations
of interfaces, *Provider.Registration
to register
implementations of appropriate providers.
ContextProvider
implemented more broadly; DebuggerManager.join
DebuggerEngine
DebuggerInfo
DebuggerManager
Session
; made by: jglick; issues:
#128229
ContextProvider
is now properly generified, and implemented also by:
DebuggerEngine
DebuggerInfo
DebuggerManager
Session
The new method DebuggerManager.join
can be used to merge lookup lists easily.
As with any generification, it is possible for old code to no longer compile. E.g.
List<X> = lookup.lookup(folder, X.class);
must be changed to:
List<? extends X> = lookup.lookup(folder, X.class);
To be able to set breakpoint for number of iterations, we need to add a filter for hit counts into Breakpoint API.
Added methods:
Breakpoint.getHitCountFilter()
,
Breakpoint.getHitCountFilteringStyle()
,
Breakpoint.setHitCountFilter()
.
Added fields:
Breakpoint.PROP_HIT_COUNT_FILTER
,
Breakpoint.HIT_COUNT_FILTERING_STYLE
.
Added fields:
Breakpoint.PROP_VALIDITY
-
This constant is used in property change events as a notification about change in validity.
Breakpoint.VALIDITY
- enumeration of constants for breakpoint validity.
Added methods:
Breakpoint.getValidity()
,
Breakpoint.getValidityMessage()
,
Breakpoint.setValidity()
- validity management.
Added fields:
ActionsManager.ACTION_STEP_OPERATION
,
This constant is used in action performer which implements an operation step.
Added methods:
ActionsManager.postAction(Object)
,
ActionsProvider.postAction(Object, Runnable)
,
These can be used to call and implement asynchronous actions.
Having final modifier for this method can be too obstructive in some cases. I had a problem writing tests.
Breakpoint.getGroupName (), Breakpoint.setGroupName () methods were added. Breakpoint.PROP_GROUP_NAME has been added.
ActionsManager.doAction (...)
,
ActionsProvider.doAction (...)
and
ActionsManagerListener.actionPefrormed (...)
methods
will not return boolean any longer. This parameter was unusefull and it was not posible to
implement it in some meaningful way.
void DebuggerManager.startDebugging (DebuggerInfo)
has been changed to DebuggerEngine[]
DebuggerManager.startDebugging (DebuggerInfo)
. So it returns array of all DebuggerEngines
created for given DebuggerInfo.