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.
Closing one or more projects triggers initialization (creation) of all non-existing TopComponents that are declared to be docked in the editor mode. This may take a long time. The method that triggers this initialization in in file ProjectUtilities.java, in method doClose() (in an anonymous inner class): private void doClose(Project[] projects, boolean notifyUI, Wrapper wr) { // // ... (preceding non-essential code) ... // WindowManager wm = WindowManager.getDefault(); for (Mode mode : wm.getModes()) { if (!wm.isEditorMode(mode)) { continue; } for (TopComponent tc : mode.getTopComponents()) { // ^ // this triggers the creation ---| } //... } } I understand the motivation for the above code. I also do not know of any other way of writing it better until the Window System API provides a method like Mode.getExistingTopComponents(). So I assume that the Window System API needs to be extended to allow such a call.
*** Issue 168244 has been marked as a duplicate of this issue. ***
Loading, initialization and closing of never-used TopComponents takes approximately 750 ms on my system (Intel Core 2 Quad @ 3 GHz).
*** This issue has been marked as a duplicate of 168453 ***