Filing as recommended by jtulach in Bug 198657 comment 2.
Perhaps this behavior was introduced when OutputWindow was reworked. Cc'ing mentlicher.
Integrated into 'main-golden'
User: S. Aubrecht <email@example.com>
Log: #198748 - don't close opened TopComponents when moving them between modes
Created attachment 151173 [details]
Debug session in (IntelliJ IDEA) that demonstrates the problem
The bug still seems to be there or is back again in NetBeans 8.0.2. At least I am suffering from an equal case. I am rearranging/tiling editor windows in my app using a dedicated actions that dock opened top components into predefined editor modes. I've attached a screenshot of a debug session where one can see the call stack from Mode.dockInto() up to the point where my TopComponent.componentClosed() is called. You can also see from the code (TileUtilities.java) that I've checked whether the window is already contained the target mode to make sure it is contained open in another mode, before dockInto() is called.