Bug 443236 - [DetachedView] Omit selecting sibling part when detached window is closed
Summary: [DetachedView] Omit selecting sibling part when detached window is closed
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3.2   Edit
Hardware: PC Windows 7
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-03 12:26 EDT by darrel karisch CLA
Modified: 2015-07-07 06:23 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description darrel karisch CLA 2014-09-03 12:26:54 EDT
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.
Comment 1 darrel karisch CLA 2014-09-12 09:26:06 EDT
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.