Bug 55722 - [EditorMgmt] ctrl+e shortcut doesn't activate editor properly
Summary: [EditorMgmt] ctrl+e shortcut doesn't activate editor properly
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
: 56048 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-23 13:23 EST by Erich Gamma CLA
Modified: 2004-03-25 17:38 EST (History)
7 users (show)

See Also:


Attachments
Patch for org.eclipse.ui.workbench (1.46 KB, patch)
2004-03-25 16:13 EST, Kim Horne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2004-03-23 13:23:15 EST
1) open some Java file in the editor
2) open another Java file
3) use ctrl+e to switch to the file opened in step 1)
4) use ctrl-o to bring the quick outline
->the contents of the quick outline is the file opened in step 2) and not the 
visible one.
Comment 1 Debbie Wilson CLA 2004-03-24 10:32:29 EST
Erich, which build was this in?
Comment 2 Erich Gamma CLA 2004-03-24 12:53:48 EST
sorry...200403231208
Comment 3 Dirk Baeumer CLA 2004-03-25 06:16:56 EST
The outline is affected by this as well. Still happens in build I20040325_0010
Comment 4 Douglas Pollock CLA 2004-03-25 10:39:01 EST
On Linux-GTK, focus disappears completely.  Pressing tab or arrow keys doesn't 
seem to cause any visible effect.  This is an accessibility issue, as a mouse 
is required once this state is entered. 
Comment 5 Nick Edgar CLA 2004-03-25 10:42:58 EST
*** Bug 56048 has been marked as a duplicate of this bug. ***
Comment 6 Kim Horne CLA 2004-03-25 15:17:58 EST
Chris, unless you're already looking at this I'm going to give it a peek.
Comment 7 Kim Horne CLA 2004-03-25 15:31:42 EST
In EditorList.gotoSelectedElement() we're setting the selection in the
presentation to the selected editor rather than activating hte editor from the
workbench page.
Comment 8 Stefan Xenos CLA 2004-03-25 15:35:35 EST
I fixed a symmetrical bug in views by making a change to
PartTabFolder.presentationSelectionChanged. Here's the new version:

    private void presentationSelectionChanged(IPresentablePart newSelection) {
    	LayoutPart newPart = getLayoutPart(newSelection); 
    	
    	if (newPart == current) {
    		return;
    	}
    	
        setSelection(newPart);
        
        if (newPart != null) {
        	newPart.setFocus();
        }

        // set the title of the detached window to reflect the active tab
        Window window = getWindow();
        if (window instanceof DetachedWindow) {
            window.getShell().setText(newSelection.getTitle());
        }
    }
Comment 9 Stefan Xenos CLA 2004-03-25 15:37:33 EST
...what I added was the setFocus bit. I suspect a similar change will work for
EditorWorkbook.
Comment 10 Kim Horne CLA 2004-03-25 16:13:11 EST
Created attachment 8895 [details]
Patch for org.eclipse.ui.workbench
Comment 11 Kim Horne CLA 2004-03-25 16:15:12 EST
Could a pair of UI committers please look at this and commit if it's OK? 
Preferably at least one of you will have ownership of the presentation work...
Comment 12 Chris McLaren CLA 2004-03-25 16:31:50 EST
i will take it. thanks..
Comment 13 Chris McLaren CLA 2004-03-25 17:00:40 EST
your patch seems good. 

i have just encountered a variant of this problem, both with the patch and
without, that i can reproduce within about 30 seconds though exact steps elude
me right now:

using ctrl+e, picking an editor, ctrl+o, esc (or select), repeat, sometimes
typing within the editor before i select another, i get to a point where neither
ctrl+e or ctrl+o works. 

i know there are some child shell issues on swt on gtk, perhaps something here
is to blame. 
Comment 14 Douglas Pollock CLA 2004-03-25 17:04:49 EST
Please see Bug 56231.  Is that behaviour already existent (i.e., with or 
without the patch)? 
Comment 15 Chris McLaren CLA 2004-03-25 17:38:34 EST
yes doug thanks, i did log 56261 but will close that as a duplicate.
closing this pr as fixed..