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.

Bug 62614 - Use Classloader info to close module TCs on module disablement
Summary: Use Classloader info to close module TCs on module disablement
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-18 17:38 UTC by _ tboudreau
Modified: 2011-01-28 14:16 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2005-08-18 17:38:35 UTC
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).
Comment 1 Jesse Glick 2005-08-18 17:51:04 UTC
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.
Comment 2 _ rkubacki 2005-08-24 13:18:28 UTC
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.
Comment 3 _ rkubacki 2007-10-30 18:09:05 UTC
Mostly performance related. Passing to Petr N.