See bug #200636 comment #7 JG07. The candidate packages that I know of are:
I would propose a pair of PACKAGE annotations in openide.explorer, with an @OnStart task to process them. (And perhaps also listen for subsequent changes, in case the registering module is dynamically unloaded, though this would not happen in the IDE.)
Both the regular core bridge and org.netbeans.core.osgi.Activator could be simplified by this.
May also want a TYPE annotation for PropertyEditorManager.registerEditor, which PropUtils.getPropertyEditor would load (since PEM.rE cannot be made really lazy):
(I18nFormCrossModule cannot clearly be removed this way since it uses FormPropertyEditorManager.registerEditor which allows multiple editors for a single type; perhaps something in openide.explorer could return a List<PropertyEditor>, and FPEM could take advantage of it?)
If you agree this would be useful, can do as a separate API review after bug #200636 is merged, to remove a few more ModuleInstall's that would otherwise be recalcitrant.
This is very similar to work done by Jan in bug 218300.
Created attachment 128328 [details]
Y01 Adding abstract method like public abstract void registerBeanInfoSearchPath() is an incompatible change. To avoid problems with it I'd suggest to do the registration inside of registerPropertyEditors(). Unless there is some strong reason for having these two kinds of registrations separated. On the other hand static method like NodeOp.registerBeanInfoSearchPath is probably going to cause no API issues (but see Y03).
Y02 "Add the annotated package to the list of package names" - what 'list of package names' do you mean?
Y03 Lowest priority: Is there really a usecase for someone registering just property editor and not bean infos (or vice-versa)? Maybe there could be a single method to register everything (although I admit I don't know how to name it).
Y04 Useless printing does not belong into test. System.out.println("- " + path[i]); if you want to get some logging info when the test fails use Logger and override logLevel().
Thanks for simplifying code in so many modules!
Created attachment 128416 [details]
Y01 - Y04 fixed
Integrated into 'main-golden', will be available in build *201212060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jan Horvath <email@example.com>
Log: #210323 Annotation to register BeanInfo & PropertyEditor search paths