Bug 196357 - [Viewers] Resorting a table/tree without scrolling to selection
Summary: [Viewers] Resorting a table/tree without scrolling to selection
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 174968
Blocks:
  Show dependency tree
 
Reported: 2007-07-12 14:03 EDT by Rutger Ovidius CLA
Modified: 2019-09-06 15:30 EDT (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 Rutger Ovidius CLA 2007-07-12 14:03:43 EDT
In Windows Explorer (XP) if you select an item, scroll to the top, and resort by clicking a table column header, the table contents sorts but the item selected is not revealed/scrolled into view.  The scrollbar does not move.

This doesn't seem possible AFAICT with JFace Viewers, which (in preservingSelection/setSelectionToWidget even with "reveal" boolean off) always reveals the re-selected items due to Table/Tree.setSelection revealing them.  You can see this in Eclipse Problems View or Tasks View.
Comment 1 Boris Bokowski CLA 2008-10-26 09:50:31 EDT
I looked into this, and I agree that the current behaviour does not match what Windows does. However, we would have to change just too many places in our code, and I am not sure if the improvement is worth taking this risk.

There is a workaround, at least for TableViewer - change the sort logic inside your sorter/comparator and call TableViewer.refresh(true, false).

If you want, we could add similar API to TreeViewer.

Removing target milestone.
Comment 2 Boris Bokowski CLA 2009-11-26 09:53:52 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 3 Eclipse Webmaster CLA 2019-09-06 15:30:05 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.