Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 56361

Summary: [ViewMgmt] (regression) Ctrl+F7 switcher puts Editor as second item
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Ines Khelifi <ines>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P4 CC: douglas.pollock, markus.kell.r
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on: 60970    
Bug Blocks:    

Description Nick Edgar CLA 2004-03-26 10:54:02 EST
build I20040326-0800

- in Java perspective, activate the Package Explorer then the Hierarchy view
using the mouse
- Ctrl+F7 (and hold Ctrl)
- note that Package Explorer is the selected item (correct)
- Ctrl+F7 (and hold Ctrl)
- Editor is the selected item (wrong)

It should always have the previously selected part as the initial item.

This switcher shows a simple MRU list of recently activated parts, including the
whole editor area as a single part (don't want separate entries for different
editors, use Ctrl+F6 for that).

Chris, can you investigate for M9 please?
Comment 1 Nick Edgar CLA 2004-04-15 12:09:46 EDT
Does marking this as P4 mean that it will not get addressed for M9?
I think it's a serious regression.
Comment 2 Douglas Pollock CLA 2004-04-15 12:17:29 EDT
Yes, it means that there are more important items for M9, and that I will fix 
them in the priority order listed.  It is unlikely that I will have time to get 
to this bug. 
Comment 3 Nick Edgar CLA 2004-04-29 12:59:02 EDT
*** Bug 60394 has been marked as a duplicate of this bug. ***
Comment 4 Douglas Pollock CLA 2004-05-04 12:01:42 EDT
Ines: could you look at this one as well?  This is likely a regression caused 
by the presentation work.  You can try talking to Stefan or MVM. 
Comment 5 Ines Khelifi CLA 2004-05-04 13:31:27 EDT
I tested this bug using I20040504 and M8. It seems to always select the second
item on the list. I am currently investigating.
Comment 6 Ines Khelifi CLA 2004-05-04 14:06:51 EDT
Now that I understand how it works, I was able to reproduce the behavior :) 
It behaved differently on M8 and I20040504.

My Steps:
- In the Java perspective, open a java file.
- Select (with the mouse) the Package Explorer then the Hierarchy.

On M8:
- Hit Ctrl+ F7: The Package Explorer is selected -> CORRECT
- Hit Ctrl+ F7: The editor is selected instead of the Hierarchy -> INCORRECT

On I20040504:
- Hit Ctrl+ F7: The Editor is selected instead of the Package Explorer -> INCORRECT
- Hit Ctrl+ F7: the Hierarchy is selected -> CORRECT
Comment 7 Ines Khelifi CLA 2004-05-04 16:58:41 EDT
I added print out statements to "WorkbenchPage#setActive(IWorkbenchPart part)".
When I select certain views, "setActive()" gets called on an open editor before
"setActive()" is called on the view I selected.

I can reproduce the behavior described above by selecting the following views:
- Console 
- Search
- Package Explorer

On the other hand, these views do trigger the activation of an open editor:
- Ant
- Declaration
- Navigator

The ordering is then skewed because of this behavior. When this behavior occurs
(it does not occur every time, just on some views), the editor is always the
second to last item selected. Pressing "Ctrl+F7" will then select that
particular editor.

I will log a bug report about this and mark this one as dependant.
Comment 8 Nick Edgar CLA 2004-05-11 17:05:19 EDT

*** This bug has been marked as a duplicate of 60970 ***
Comment 9 Ines Khelifi CLA 2004-05-19 11:39:08 EDT
Verified using Build id: 200405190010 on Windows XP and Mac OS X.