Bug 152675 - [67cat] Need a view of all services registered via annotations
[67cat] Need a view of all services registered via annotations
Status: NEW
Product: apisupport
Classification: Unclassified
Component: Project
6.x
All All
: P3 with 2 votes (vote)
: TBD
Assigned To: Martin Kozeny
issues@apisupport
: PATCH_AVAILABLE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-07 13:06 UTC by _ tboudreau
Modified: 2013-11-01 21:48 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Patch to add Important Files > Default Lookup to module projects (24.41 KB, patch)
2009-04-29 19:49 UTC, _ tboudreau
Details | Diff
Slightly improved patch - also supports legacy META-INF/services entires + better listening for deletions (28.23 KB, text/plain)
2009-04-29 23:07 UTC, _ tboudreau
Details
hg diff (28.51 KB, text/plain)
2009-04-30 00:30 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2008-11-07 13:06:36 UTC
Since META-INF/services registration is being replaced with annotations, we have a regression in functionality from
apisupport - if you are working on a module that is unfamiliar, it is difficult to find out what it registers as
services, which slows down the person trying to fix it.
Comment 1 Jesse Glick 2008-11-07 16:54:03 UTC
You can use Find Usages on ServiceProvider, or just look at the info messages printed during the build. But yes we plan
to have some kind of "registration overview" action.
Comment 2 _ tboudreau 2009-04-29 19:49:04 UTC
Created attachment 81233 [details]
Patch to add Important Files > Default Lookup to module projects
Comment 3 _ tboudreau 2009-04-29 19:51:43 UTC
The attached patch scans all Java sources in the source classpath, and finds all annotated with ServiceProvider.  It
could certainly be more efficient about detecting renames and such (right now any save of a Java file results in a
rescan if the child nodes are expanded), but it works.

Note with the attached patch, you'll need to provide some icon at
org/netbeans/modules/apisupport/project/resources/defaultLookup.png
Comment 4 _ tboudreau 2009-04-29 23:07:15 UTC
Created attachment 81249 [details]
Slightly improved patch - also supports legacy META-INF/services entires + better listening for deletions
Comment 5 Jesse Glick 2009-04-29 23:43:00 UTC
Tim, don't use the IDE's Diff facility. Use 'hg diff', and make sure you have set

[diff]
git=1

This can represent renames, binary files, etc.


We probably want to scan for any annotations which have an associated LayerGeneratingProcessor in the classpath. The
proper UI for all this is not clear.


Not sure that we want to resurrect the permanode UI of the old services browser. It was never very efficient or stable.
A one-off scan of sources upon request, say going to the Output Window with hyperlinks, would be simpler to implement
and have no performance risk.
Comment 6 _ tboudreau 2009-04-30 00:30:00 UTC
Created attachment 81259 [details]
hg diff
Comment 7 _ tboudreau 2009-05-02 15:26:03 UTC
Well, the code in the attached patch could easily be adapted to print output instead of creating nodes, so either way
this should now be trivial to implement.  I'd suggest we do *something* either way - I'm not terribly attached to which
thing we do.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo