This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
See bug #200636 comment #7 JG07. The candidate packages that I know of are: org.netbeans.beaninfo org.netbeans.beaninfo.editors org.netbeans.core.execution.beaninfo org.netbeans.core.execution.beaninfo.editors org.netbeans.modules.cnd.builds org.netbeans.modules.collab.ui.beaninfo org.netbeans.modules.form.beaninfo.awt org.netbeans.modules.form.beaninfo.swing org.netbeans.modules.xml.tax.beans.beaninfo org.netbeans.modules.xml.tax.beans.editor org.openide.explorer.propertysheet.editors 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): org.netbeans.modules.form.editors.KeyStrokeEditor org.netbeans.beaninfo.editors.CharEditor org.netbeans.beaninfo.editors.StringArrayEditor org.netbeans.beaninfo.editors.IntEditor org.netbeans.beaninfo.editors.BoolEditor (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] patch
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] fixed patch
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) Changeset: http://hg.netbeans.org/main-golden/rev/f8084d0ee724 User: Jan Horvath <jhorvath@netbeans.org> Log: #210323 Annotation to register BeanInfo & PropertyEditor search paths
Fixed I'd say: http://bits.netbeans.org/dev/javadoc/org-openide-nodes/apichanges.html#BeanInfoSearchPath