Bug 510710 - AbstractTreeViewer should scroll up to currently selected element when CollapseAll is pressed.
Summary: AbstractTreeViewer should scroll up to currently selected element when Collap...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-19 13:24 EST by Leo Ufimtsev CLA
Modified: 2017-01-19 13:24 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-01-19 13:24:50 EST
Example:
- I have a long list of git repositories, usually linked to the currently open file.
   I.e, a tree that is expanded very deeply.
- I click on 'collapse all' in git repository view.
- All repositories are collapsed, but the currently selected item is somewhere above the current view. 
- I have to scroll up to find the currently selected repository.

This applies also to other components that use AbstractTreeViewer. Ex package explorer.

It's a very small detail, but somewhat tedious on a day-to-day basis.

Suggestion:
org.eclipse.jface.viewers.AbstractTreeViewer.collapseAll()
Should scroll the view such that the currently selected item is visible in view.