Bug 2520 - Minor: active editor is not updated properly (1GFIS9J)
Summary: Minor: active editor is not updated properly (1GFIS9J)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ryan Cooper CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2001-10-10 22:38 EDT by Kevin Haaland CLA
Modified: 2002-01-25 16:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Haaland CLA 2001-10-10 22:38:02 EDT
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.
Comment 1 DJ Houghton CLA 2001-10-29 18:57:23 EST
PRODUCT VERSION:
125

Comment 2 Kevin Haaland CLA 2002-01-21 22:38:41 EST
Simon, 

   Please try in latest 2.0 builds. 
Comment 3 Simon Arsenault CLA 2002-01-22 10:13:33 EST
Try reproducing the problems with the original steps provided...
Comment 4 Ryan Cooper CLA 2002-01-23 10:50:45 EST
Build: 20020115

The first problem still exists. When a file is selected in the Navigator view, 
it becomes visible but not active, so clicking on File->Close doesn't 
necessarily close the visible file.

The second problem no longer exists, since grabbing the title bar of a file in 
the editor workspace automatically selects it. It is impossible to drag and 
drop a file this way without selecting it.
Comment 5 Simon Arsenault CLA 2002-01-25 16:46:15 EST
The first problem comes from the implementation of the ActiveEditorAction class 
which did not track/cache the active editor properly. Code changed to do so.

Fix in build > 2002-01-25