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

set sort label for quick access elements to avoid symbols get removed when they have the same label #1124

Merged

Conversation

martinlippert
Copy link
Contributor

When you have multiple workspace symbols with the same label, only one shows up in the workspace quick access list. The reason is that the filtering and sorting mechanism of the quick access dialog uses a comparator for a set that uses the getSortLabel method of the elements - which refers to getLabel by default.

This PR overrides the default implementation and makes sure (by adding the random extension ID to make symbols unique) that getSortLabel returns different values for different symbols, even if they have the exact same label.

As a follow-up here, we should think about showing more information for a symbol on the dialog to allow users to distinguish those symbols with the same label somehow, but that is a task for a separate PR or issue.

Copy link
Contributor

@mickaelistria mickaelistria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to me. Feel free to merge as soon as Jenkins build completes successfully.

@martinlippert martinlippert merged commit 8cd5d23 into eclipse-lsp4e:main Sep 27, 2024
6 checks passed
@martinlippert
Copy link
Contributor Author

Thanks @mickaelistria and @rubenporras for taking a look, much appreciated. Merged now.

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