Debugger Core SPI have @BreakpointType.Registration.
But it doesn't work as expected:
1) It's not possible to mix old META-INF/debugger/spi.debugger.ui.BreakpointType and new annotation based breakpoint types (layer based takes precedence)
2) Layer-based (generated from annotation) doesn't work as well. listeners are not attached to controller as it was before => It's impossible to create Breakpoint from New Breakpoint dialog, because validation is not called
Btw, BreakpointType.Registration has displayName() as lazy variant of BreakpointType.getTypeDisplayName, but it doesn't solve lazy loading problem, because BreakpointType.Registration does not have lazy variant of BreakpointType.getCategoryDisplayName
1) Can you please elaborate what do you mean by mix of META-INF/debugger/spi.debugger.ui.BreakpointType and annotation by @BreakpointType.Registration? I've tried to use some breakpoint types defined by the old approach with some defined by annotations and it worked well. At least in JPDA Debugger I did not encounter any problem.
2) Problem identified and fixed in changeset: 156110:25be4aeefba4
1) Doesn't work in external application based on NB. I will recheck, because using annotation and old style in CND debugger works fine
What about 3)? lazy variant of BreakpointType.getCategoryDisplayName
1) So please include steps how can we reproduce it if you find that it still does not work.
3) lazy variant of BreakpointType.getCategoryDisplayName - we can add it, but I think that the effect is questionable. As soon as AddBreakpointPanel calls BreakpointType.getCategoryDisplayName(), it also calls BreakpointType.isDefault(), which usually involves some logic with respect to the context.
Closing as fixed for now, please reopen if you can reproduce 1)
3) I think this needs a separate performance bug to analyze the problem. Do you have some test failing because of this, similar to bug #177561?
Integrated into 'main-golden', will be available in build *200912220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: #178890 - Override and delegate getController()
debugger BP type names are used to fill up combobox of BP kinds and it is lazy now.
Category name is used to fill up combobox of different debuggers. And it does not have lazy variant => you have to load all classes from PHP, CND, ... other debuggers even if plan to use Java debugger.
So, why this lazy registration is needed at all if all classes are loaded anyway?
3) The lazy display name was needed by ergonomics when issue #153093 was implemented.
It looks like now we need to evaluate the performance point of view and add the declarative parts requested in issue #153093. I'll propose some solution in issue #177561.