Bug 5052 - Scrolling to the top of page when synching packages view
Summary: Scrolling to the top of page when synching packages view
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Erich Gamma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-17 15:32 EDT by Veronika Irvine CLA
Modified: 2001-10-19 14:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Veronika Irvine CLA 2001-10-17 15:32:19 EDT
Eclipse 200011011

0) Turn on the preference "Link packages view selection to the active editor".
1) Perform a java search on something that will have at least one result.
2) Look at the search and pick a class in the list of results.
3) Go to the packages view and make sure that a) the packages view is open, 
visible and not stacked with the search view and b) the class selected in the 
packages view is not the class you picked in step 2.
4) In the search view, click on the entry for the class you selected in step 2.

Notice:  The editor for that class is opened.  The editor is scrolled to the 
line matching the search result.

5) Click on the editor.

Notice: The editor scrolls up to the top of the file and you can no longer see 
the place where the search pointed.

Note:  you will only see the problem if the search result points you to 
somewhere below the first page of the class definition.

What I believe is going on is that when you click on the editor in step 5 that 
editor becomes the active editor and the packages view tries to synch up.  As 
part of synching up with the packages view, the editor is scrolled to the top 
of the file.

I do not think that synching up bewteen the active editor and the packages view 
should cause the editor to scroll to the top.  Why can't the file stay at its 
current scroll position.

I have seen this scrolling in other scenarios as well and it causes me to have 
to re-locate the place I wanted to edit.  In the end I just am forced to turn 
off "Link packages view selection to the active editor" but then I am 
frustrated when I want to do something such as compare with another version and 
I have to go hunt for the class in the packages view.
Comment 1 Erich Gamma CLA 2001-10-19 14:55:02 EDT
fixed in 206