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.
Modules are supposed to clean up their TopComponents when they are disabled. Currently this is supposed to work (but may be broken) if the module defines its TC in a layer/xml files. For TC subclasses, the module providing the TC can be determined by checking the classloader of the subclass. So the system could automatically close TopComponents belonging to a module which is being disabled. AFAIK without this, we are implicitly requiring that TC-providing modules have a ModuleInstall (which is undesirable) or not work correctly (also undesirable).
Having a ModuleInstall that just overrides uninstalled() is not bad as such, but it is a bit ugly, and it is certainly extra work on the part of every module.
Tim is correct that we would like to avoid ModuleInstall class that has to be loaded during startup (and analyzed w/ reflection to check if there is validate() method). Also maintaining the set of components is prone to leaks. It works for some cases like module w/ loader and editor where the DO is invalidated and its editor is closed. Others like javadoc have to manage the closing so persoanlly I'd like it.
Mostly performance related. Passing to Petr N.