Bug 510710

Summary: AbstractTreeViewer should scroll up to currently selected element when CollapseAll is pressed.
Product: [Eclipse Project] Platform Reporter: Leo Ufimtsev <lufimtse>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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.