For whatever reason, the original debugger-related SPIs began to use their own object registration system. I guess this
was before Lookups.forPath and META-INF/namedservices, or maybe there was simply a reluctance to rely on
Anyway, there are now hundreds of objects registered using this system, and module developers would benefit from being
able to use annotations to register them. See the wiki link for ideas.
Please consider defining appropriate annotations and matching processors in the debugger SPIs, and updating netbeans.org
modules to use the new annotations. It should not be much work (need API_REVIEW_FAST of course).
Proper declarative registration could prevent needless classloading (register providers to some file mime-type,
provide declarative names for Attach, Breakpoint, etc. types to prevent the object classes from being loaded unless
really needed, and probably more). Moreover annotations are nicer for its users and can shield them from gory details
of the actual registration.
This issue is simply about offering annotations as a convenience for creating registrations via the existing SPI. If
there is indeed any potential performance gain in making the debugger registration SPIs even lazier than they already
are (which from a casual inspection I doubt), wonderful, but that would be an entirely separate effort. Please do not
conflate the two.
The definition of annotations and matching processors is really a separate issue from changing the debugger lookup to
delegate to Lookups.forPath(). I'm going to submit a separate issue for that, because things are not so trivial.
org.netbeans.api.debugger.Lookup does much more things than org.openide.util.lookup.MetaInfServicesLookup.
It uses "-hidden" concept inside of files listing the services, factory methods, lazy instantiation.
Using of org.openide.util.lookup.MetaInfServicesLookup in it's current form would be a step back and if we rewrite some
of our modules to use it, "-hidden" concept would stop working, therefore it would be an incompatible change.
A possible solution could be to just add org.openide.loaders.FolderLookup to the current debugger lookup, or better,
create DebuggerMetaInfServicesLookup - copy of org.openide.util.lookup.MetaInfServicesLookup with the logic of
org.netbeans.api.debugger.Lookup.MetaInf and compose it together in the same way as