Community
Participate
Working Groups
When a detached window is closed each part within it is hidden serially in WBWRenderer::closeDetachedWindow. PartServiceImpl::hidePart selects a sibling part when the input MPart is the selected element. This selection causes the sibling parts activation that may produce many side-effects that are not desirable since the sibling part will be closed subsequently. I suggest that WBWRenderer::closeDetachedWindow invoke hidePart on each part somehow omitting the selection of a sibling part when the part being hidden is the selected element.
Same applies to WorkbenchPage::closeEditors and any other like use cases. Generally, PartServiceImpl::hidePart needs to know the set of parts that are scheduled to close and omit selecting and activating them. Perhaps there should be a PartServiceImpl::hideParts method to take a set of parts to hide. On the broader issue of superficially unnecessary activation. Consider two open editors, E1 and E2, in the same page area. E2 is active. Click on the close button of E1. This action causes activation of E1 even though it will close subsequently under normal circumstances. The close prompts the reactivation of E2. These activations may cause the UI to convulse quite a bit, seemingly unnecessarily.