Bug 472880

Summary: Smarter numerical sorting in navigators
Product: [Eclipse Project] Platform Reporter: Konstantin Komissarchik <konstantin>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: Lars.Vogel, psuzzi, sakgoy2001
Version: 4.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2015-07-16 17:25:21 EDT
The various file navigators in Eclipse seem to use strictly alphabetical sort order. This is less than ideal when dealing with files that have numerical components.

Sapphire-0.7.x
Sapphire-10.0.x
Sapphire-8.0.x
Sapphire-9.1.x

In comparison, Windows sorts these folders more intelligently.

Sapphire-0.7.x
Sapphire-8.0.x
Sapphire-9.1.x
Sapphire-10.0.x

I propose to implement a similar sort heuristic for Eclipse navigators. The logic is pretty simple. When considering a character in the comparison loop, if it's a digit, consume any trailing digits, then compare as a number instead of as a character.

If there is support for making this change, I will contribute a patch.
Comment 1 Lars Vogel CLA 2015-07-16 22:50:18 EDT
Gerrit review is welcome
Comment 2 Konstantin Komissarchik CLA 2015-07-17 16:41:45 EDT
I can go dig, but do you know off hand which class implements the current navigator sort logic?
Comment 3 Dani Megert CLA 2016-10-28 08:24:52 EDT
*** Bug 506282 has been marked as a duplicate of this bug. ***