Bug 571744

Summary: AbstractTableViewer.virtualSetSelectionToWidget(List, boolean) should use IIndexableLazyContentProvider
Product: [Eclipse Project] Platform Reporter: Christoph Laeubrich <laeubi>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.20   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Christoph Laeubrich CLA 2021-03-06 02:12:01 EST
AbstractTableViewer.virtualSetSelectionToWidget currently possibly iterates through all elements to get the index of a selection for VirtualTables.

The code contains the following comments:

// Now go through it again until all is done or we are no longer
// virtual
// This may create all items so it is not a good
// idea in general.

a "better" idea would be to at least check for IIndexableLazyContentProvider and call IIndexableLazyContentProvider.findElement(Object) instead if possible.