Skip navigation links
org.netbeans.api.debugger/1 1.79

Package org.netbeans.spi.debugger

The NetBeans Debugger SPI definition defines interface to Debugger Plug-ins.

See: Description

Package org.netbeans.spi.debugger Description

The NetBeans Debugger SPI definition defines interface to Debugger Plug-ins. It allows to extend some already existing debugger, or create a new implementation of debugger.

Debugger SPI allows to:

Registration

Debugger Core SPI contains service providers extending basic Debugger Core API model. Each service provider must be registerred in Meta-inf/debugger. Meta-inf/debugger is special folder in module *.jar file.

If you would like to register some implementation(s) of some service to some Debugger Core API interface of type {type name}, you should create file with name {service full class name}in folder Meta-inf/debugger/{type name}.
The file should contain a list of fully-qualified class names, one per line, of classes implementing the service interface and having default public constructor. It's also possible to append a name of a static method followed by paranthesis, which returns the implementation of the service. That method is then called instead of the default constructor. The method can not take any arguments. If there is a need to remove a service that is provided by some other module, append '-hidden' after the class or method name. Space and tab characters surrounding each name, as well as blank lines, are ignored. The comment character is '#' (\u0023); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

Example I:
I would like to register org.netbeans.modules.debugger.jpda.actions.StepAction and org.netbeans.modules.debugger.jpda.actions.StartAction service implementations for JPDA DebuggerEngine. In this case I should create file named org.netbeans.spi.debugger.ActionsProvider in folder Meta-inf/debugger/netbeans-JPDADebuggerEngine/. "netbeans-JPDADebuggerEngine" is a name of JPDA DebuggerEngine, and it can be obtained from DebuggerEngine.getTypeID(). This file should contain two lines:
org.netbeans.modules.debugger.jpda.actions.StepAction
org.netbeans.modules.debugger.jpda.actions.StartAction


Example II:
I would like to remove the default 'type' and 'toString' columns in LocalVariables view and add a 'builtin' column instead. This is supposed to work for ANT debugger. In this case I should create file named org.netbeans.spi.viewmodel.ColumnModel in folder META-INF/debugger/AntSession/LocalsView/. This file should contain three lines, the first two remove columns we do not want to appear for ANT debugger, the third adds ANT-specific column:
org.netbeans.modules.debugger.ui.models.ColumnModels.createLocalsTypeColumn()-hidden
org.netbeans.modules.debugger.ui.models.ColumnModels.createLocalsToStringColumn()-hidden
org.netbeans.modules.ant.debugger.ColumnModels.createBuiltInColumn()


List of all default service providers:

Service provider interface
Should be registerred to:
File names:
SessionProvider
DebuggerInfo folder name: Meta-inf/debugger/{DebuggerInfo type name}
file name: org.netbeans.spi.debugger.SessionProvider
DelegatingSessionProvider  DebuggerInfo folder name: Meta-inf/debugger/{DebuggerInfo type name}
file name: org.netbeans.spi.debugger.DelegatingSessionProvider
DebuggerEngineProvider Session  folder name: Meta-inf/debugger/{Session type name}
file name: org.netbeans.spi.debugger.DebuggerEngineProvider
DelegatingDebuggerEngineProvider Session folder name: Meta-inf/debugger/{Session type name}
file name: org.netbeans.spi.debugger.DelegatingDebuggerEngineProvider
org.netbeans.spi.debugger.WatchesProvider  DebuggerEngine  folder name: Meta-inf/debugger/{DebuggerEngine type name}
file name: org.netbeans.spi.debugger.WatchesProvider

ActionsProvider
DebuggerEngine
folder name: Meta-inf/debugger/{DebuggerEngine type name}
file name: org.netbeans.spi.debugger.ActionsProvider



Skip navigation links
org.netbeans.api.debugger/1 1.79