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

Bug 56979

Summary: [EditorMgmt] [OpenModes] (regression) Inconsistent arrow keys behaviour with and without files opened on the Editor window
Product: [Eclipse Project] Platform Reporter: Brian So <bso>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: farrellp, ines, n.a.edgar
Version: 3.0Keywords: helpwanted
Target Milestone: 3.0 RC1   
Hardware: Sun   
OS: Solaris   
Whiteboard:
Bug Depends on:    
Bug Blocks: 54296    

Description Brian So CLA 2004-03-31 16:56:47 EST
This is the procedure to create the inconsistent arrow keys behaviour on 
Solaris 9 and HPUX11.11:
1. With 3.0M8 create a project say 'test' and create 3 files under the project 
say file1, file2, and file3.
2. Close all files on the Editor including the welcome page. Ensure that there 
is no file on the Editor.
3. Open the Preferences dialog: Window->Preferences and select the 'Workbench' 
item. Select 'single click' in the 'open mode' combo box.
4. Check the option 'Open when using arrow keys' and click on the O.K. button.
5. Go to Resource perspective and double-click on 'test' project to expand its 
directory structure on the Navigation view. Test project is now selected 
(highlighted).
6. Use the down arrow key to go to file1. file1 should be open on the editor 
window and the focus remains on the Navigation view.
7. Use the down arrow again to go to file2. file21 should be open on the editor 
window but the focus has now switch to file2 on the Editor.
8. Close both file1 and file2. Open file3 on the Editor.
9. Select the 'test' project again. Test project is now selected (highlighted).
10. Use the down arrow key to go to file1 (as step 6). file1 should be open on 
the editor window.
11. The different is that now with one file (file3) already on the editor, the 
focus has immediately switch to file1 on the Editor instead of remains on the 
Navigation view.

The arrow keys behaviour should be the same with or without existing file(s) on 
the Editor.
Comment 1 Nick Edgar CLA 2004-04-01 11:24:50 EST
This suggests a focus problem in the editor management code.
The fact that it works for the first editor means that the view is properly
calling openEditor with activate=false (the result of
OpenStrategy.activateOnOpen()).  See OpenFileAction.openFile.

Must fix for M9.
Comment 2 Nick Edgar CLA 2004-04-13 16:56:09 EDT
Stefan, can you take this over from Chris?
Comment 3 Stefan Xenos CLA 2004-05-20 16:36:36 EDT
Defer until later in 3.0
Comment 4 Michael Van Meekeren CLA 2004-05-25 15:50:52 EDT
Tod, can you please check whether this is a problem using M9 on Solaris and/or 
HPUX?
Comment 5 Tod Creasey CLA 2004-05-26 14:19:58 EDT
Ines please have a look.
Comment 6 Ines Khelifi CLA 2004-05-27 10:49:31 EDT
I tested this bug with the steps described in the bug report using M8 and M9 on
a Solaris machine.

Unlike in M8, where the focus would jump to the editor when a file was opened
using the arrow keys, the behavior in M9 has changed so that the focus remains
in the view despite the editors opening.
Comment 7 Brian So CLA 2004-05-27 10:57:30 EDT
I like the new behaviour in M9. Please mark this bug as fixed. Thanks.
Comment 8 Nick Edgar CLA 2004-05-27 11:21:08 EDT
This sounds correct.  When in single-click mode, opening the editor, whether via
keyboard or mouse, should not give it focus.