This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 413278 - Quick switch editor only works for one editor
Summary: Quick switch editor only works for one editor
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M1   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 14:42 EDT by Marc-André Laperle CLA
Modified: 2013-08-07 06:48 EDT (History)
3 users (show)

See Also:


Attachments
Keybindings (24.99 KB, image/png)
2013-07-23 14:41 EDT, Marc-André Laperle CLA
no flags Details
Eclipse 3.8 screenshot (125.67 KB, image/png)
2013-07-23 14:42 EDT, Marc-André Laperle CLA
no flags Details
Eclipse 4.3.0 screenshot (152.00 KB, image/png)
2013-07-23 14:42 EDT, Marc-André Laperle CLA
no flags Details
Wasted space (30.60 KB, image/png)
2013-07-23 20:27 EDT, Marc-André Laperle CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2013-07-18 14:42:13 EDT
Using Eclipse 4.3 (Linux, Mac) or 4.4 I20130717-1600 (Linux)

1. Open 2 files in two editors side by side 
2. Ctrl+E in the left editor, Quick switch appears at the top of the left editor.
3. Ctrl+E in the right editor. Quick switch still appears at the top of the left editor.

This is a regression compared to 3.8.
Comment 1 Marc-André Laperle CLA 2013-07-22 10:45:23 EDT
Proposed fix:
https://git.eclipse.org/r/14748
Comment 2 Paul Webster CLA 2013-07-23 13:23:31 EDT
Eric, could you please review this?

PW
Comment 3 Eric Moffatt CLA 2013-07-23 14:09:30 EDT
Marc, I think I must be confused...the patch appears to be dead code to me; when I put a breakpoint on it and do Ctrl + Shft + E it never fires and I see no difference between what happens before or after the switch...

Also, doing the same thing in 3.8 also gets me a dialog that doesn't change position based on where the active editor is.

Could you attach a screen shot of what the editor switcher looks like to you ? Even better would be another showing how it's different in 3.8.

Also look in the Keys preference page and tell me what command Ctrl + Shft + E is bound to.

Note there's a WorkbenchEditorsHandler (as opposed to the WorkbookEditorsHandler that seems to be what you wanted (at least it's what gets invoked by my Ctrl E...).
Comment 4 Marc-André Laperle CLA 2013-07-23 14:41:01 EDT
(In reply to comment #3)
> Marc, I think I must be confused...

I think you've been looking at Switch to Editor which is different from Quick Switch Editor.
Comment 5 Marc-André Laperle CLA 2013-07-23 14:41:43 EDT
Created attachment 233724 [details]
Keybindings
Comment 6 Marc-André Laperle CLA 2013-07-23 14:42:12 EDT
Created attachment 233725 [details]
Eclipse 3.8 screenshot
Comment 7 Marc-André Laperle CLA 2013-07-23 14:42:57 EDT
Created attachment 233726 [details]
Eclipse 4.3.0 screenshot

The right editor has focus. Notice how the left editor gets the menu.
Comment 8 Eric Moffatt CLA 2013-07-23 14:58:57 EDT
Yes, my bad...sorry. I can now find the right code. I think I can see part of the issue from the screen cap. I suspect that you've managed to drag the right stack *out* of the area. This isn't generally possible unless you hold down the Ctrl key so I'm not sure how you got there (perhaps you were using an earlier (4.2 workspace and had already done this ?). I can tell because when the editor area is split in 4.x it generates an 'area' affordance containing the min / max buttons and removes them from the inner tab folders...

When you hit Ctrl M to maximize how many stacks do you see ?
Comment 9 Eric Moffatt CLA 2013-07-23 15:29:08 EDT
OK, now I see how this differs from the original code. The current code (erroneously) expects that the currently active editor is in a stack in the editor area while your code just gets the parent stack of the active editor wherever it is...

Thanks, the new code is much better. It does have an interesting side-effect; if you put an editor into a stack with views in it and make it active then Ctrl+e will show you both the views and the editor and let you switch between them, fine by me...;-).
Comment 11 Marc-André Laperle CLA 2013-07-23 20:27:19 EDT
Created attachment 233735 [details]
Wasted space

Thanks Eric! I am pleasantly surprised by how quick this was resolved.

(In reply to comment #8)
> Yes, my bad...sorry. I can now find the right code. I think I can see part
> of the issue from the screen cap. I suspect that you've managed to drag the
> right stack *out* of the area. This isn't generally possible unless you hold
> down the Ctrl key so I'm not sure how you got there (perhaps you were using
> an earlier (4.2 workspace and had already done this ?). I can tell because
> when the editor area is split in 4.x it generates an 'area' affordance
> containing the min / max buttons and removes them from the inner tab
> folders...

I always drag it out of the area because the 'area' it generates just wastes space. So is this a bug that I can just drag it out without holding Ctrl? Should I create a new bug for that?
Comment 12 Eric Moffatt CLA 2013-07-24 10:58:37 EDT
Interesting, let's hold off on opening a defect against the fact that you can split a non-editorarea stack with one from the editor area. I didn't realize that this was possible (and I wrote the code..;-) but it doesn't seem to have been causing major hassles for our users AFAIK.

I'll run the scenario by the folks here and we'll open a defect if necessary, thanks again for your work on this.
Comment 13 Daniel Rolka CLA 2013-08-07 06:48:27 EDT
Verified in the build: I20130805-2000