-
Notifications
You must be signed in to change notification settings - Fork 399
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
Code Actions are not sorted by relevance #1250
Comments
If the actions should be grouped by CodeActionKind, 'quickfix' should be on top of the list if there's a problem. The current comparator compare CodeActionKind first, in alphabetical order. The order happened to be "quickfix", "refactor", "source". But now we have new kind "quickassist", which would be ahead of "quickfix" in alphabetical order. So I'd like to use a more robust way:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, different kinds of proposals are sorted by
ChangeCorrectionProposalComparator
all together before converted to code actions. For proposals of different CodeActionKind, they are not sorted by relevance at all.See https:/eclipse/eclipse.jdt.ls/blob/1dfdeeafb9d0dd7c16d915763a30088dfa3a721e/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CodeActionHandler.java#L204-L223
Do we need to sort by relevance first?
The text was updated successfully, but these errors were encountered: