| Summary: | [Compatibility] Workbench thinks there's an active editor even if it's behind views | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Remy Suen <remy.suen> | ||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 1.0 | ||||||
| Target Milestone: | 4.1 M6 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 321864 | ||||||
| Attachments: |
|
||||||
|
Description
Remy Suen
One caveat is that we can't simply return null if the last active editor is not visible (behind other parts in another stack) as there may be an editor that's visible in the shared area.
Sounds like this should be scenario 'K' ('L'?).
This cannot happen in 3.x. The 'active' editor (even when it's the active part) will always be on top (hmmm, is there any 'show editor NOACTIVATE' API as we have for views? If so we might be able to set this up in 3.x to see what it does...).
This is a good one...I agree that closing an editor that's not 'on top' seems quite strange. We could simply check this and ignore it but we're left with other interesting possibilities...what's 'Undo' do?
(In reply to comment #2) > This cannot happen in 3.x. The 'active' editor (even when it's the active part) > will always be on top (hmmm, is there any 'show editor NOACTIVATE' API as we > have for views? If so we might be able to set this up in 3.x to see what it > does...). Yes we do, though it is still technically the "active" editor since it is "on top". The question becomes whether that editor becomes the active one or not if you have multiple editor stacks and you show an editor that's not in the same stack as the last active one. > what's 'Undo' do? Probably nothing since the active part does not support undo. This is the order I will use to determine what is the "active editor". 1. The currently active part if said part is an editor. 2. Last editor that was activated in the shared area (the org.eclipse.ui.editorss MArea) that is visible or is the selected element of its part stack. 3. Last activated editor outside the shared area/perspective that is visible or is the selected element of its part stack. If all three options are exhausted then all the remaining editors are presumed to be "in the back" of a part stack and thus should not be deemed "active" (as shown by comment 0). Created attachment 188436 [details]
WorkbenchPage patch v1
Fix released to CVS HEAD. Verified with I20110307-2200 on Windows XP. |