Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use human-friendly sorting in Outline #1174

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

sebthom
Copy link
Contributor

@sebthom sebthom commented Jan 13, 2025

This addresses eclipse-wildwebdeveloper/wildwebdeveloper#1616

Currently sorting does not sort numbers numerical.

before PR after PR
image image

@mickaelistria
Copy link
Contributor

That's a good change.
IIRC there is a similar pattern somewhere in Platform. Did you check whether there isn't such a comparator already existing that we could easily reuse?

@rubenporras
Copy link
Contributor

That's a good change. IIRC there is a similar pattern somewhere in Platform. Did you check whether there isn't such a comparator already existing that we could easily reuse?

I was thinking the same. This seems a very common problem. Could we use some code in the platform or in Guava (to mention one library we already use) to achieve it?

@sebthom
Copy link
Contributor Author

sebthom commented Jan 13, 2025

I haven't found one. I naively thought that Comparator.naturalOrder() does the trick but it doesn't.

@mickaelistria mickaelistria merged commit 642ec27 into eclipse-lsp4e:main Jan 13, 2025
5 of 6 checks passed
@mickaelistria
Copy link
Contributor

ok, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants