You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, different kinds of proposals are sorted by ChangeCorrectionProposalComparatorall together before converted to code actions. For proposals of different CodeActionKind, they are not sorted by relevance at all.
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:
First sort actions by relevance for each CodeActionKind.
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://github.com/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: