Project: Eclipse_Platform_UI
Bug 2520 Minor: active editor is not updated properly (1GFIS9J)
Reported: 2001-10-10 22:38:02 | Status: resolved fixed

I. When you select an open editor via the Navigator or Packages views, it will become visible but not active. This is probably the desired behaviour but the only problem is if you try to do an editor action (such as Close) it will close the last active editor, not the current visible one. This can be a bit confusing but is not major. Steps: 1) create file 'abc', the editor should become visible and active 2) create file 'xyz', the editor should become visible and active 3) click on 'abc' in the navigator, notice that abc's editor becomes visible but not active 4) File > Close (or Ctrl+F4) xyz closes, you would have expected abc to close. II. When you do a drag-and-drop operation on an editor to split up the editors, the editor is shown as active but the Close operation does not affect it. Steps: 1) create file 'abc', the editor should become visible and active 2) create file 'xyz', the editor should become visible and active 3) grab the title bar of 'abc' and drag it to an edge thus spliting up the editor workspace - do this in one action (do not select it before moving) 4) File > Close 'xyz' close, 'abc' should have closed NOTES: JEL (19/06/2001 3:11:00 PM) from CloseEditorAction::run -> IEditorPart part = getActiveEditor(); could be changed to -> IEditorPart part = activePage.getEditorPresentation().getVisibleEditor(); This would tell the workbench to close the Editor that is being viewed instead of the last editor that was clicked on.

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/ActiveEditorAction.java