Bug 472880 - Smarter numerical sorting in navigators
Summary: Smarter numerical sorting in navigators
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 506282 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-16 17:25 EDT by Konstantin Komissarchik CLA
Modified: 2016-11-01 06:28 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***