Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363280

Summary: SWT: Multi-Column sort does not work
Product: z_Archived Reporter: Beat Schwarzentrub <bsh>
Component: ScoutAssignee: Andreas Hoegger <Andreas.Hoegger>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: zimmermann
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
SwtScoutTable.java.patch none

Description Beat Schwarzentrub CLA 2011-11-09 05:26:58 EST
Build Identifier: 

In Swing-Scout, multiple sorting columns can be combined by holding the Ctrl key while clicking a column header. This feature is quite handy when browsing large lists of data. It works similar to the "ORDER BY" clause in SQL.

In SWT, that feature does not work, the Ctrl key is completely neglected, and "only" a normal sort operation is applied. This is likely due to a former SWT bug that did not include the modifier keys in the SelectionEvent (https://bugs.eclipse.org/bugs/show_bug.cgi?id=65679). That bug is fixed since 2009, so Scout should use the now-working stateMask to implement the behaviour described above.

I will add a patch for SwtScoutTable.java that enables the multi-sort behaviour and removes the TODO. Because SWT is not able to indicate more than one column as "sorted" (i.e. draw a small up/down arrow in the column header), the patch adds an indicator text ("[a-z]" and "[z-a]", respectively) to the column header for all sorting columns except the first one.

Reproducible: Always
Comment 1 Beat Schwarzentrub CLA 2011-11-09 05:29:25 EST
Created attachment 206660 [details]
SwtScoutTable.java.patch
Comment 2 Matthias Zimmermann CLA 2017-06-06 05:31:59 EDT
SWT support for Scout is no longer maintained in the open source domain. In case you need bugfixes for releases prior to Neon consider commercial options.