Commit d35c01e
[analysis_server] Extract computing CodeActions from the textDocument/codeAction handler
In an upcoming change, we will need to be able to compute code actions from a command handler (to handle applying a code action as a result of a command call).
This change just extracts the main computation of code actions out of the handler into a new class that can be reused there.
This change is largely just a cut/paste, but I did extract a number of inline functions to be class-level (the variables they required are now at the class level) to reduce some nesting.
Change-Id: I438cfc07edfef9fa6d98c8e29c183b30abcf82d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427220
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>1 parent ee16e36 commit d35c01e
File tree
2 files changed
+483
-370
lines changed- pkg/analysis_server/lib/src/lsp/handlers
- code_actions
2 files changed
+483
-370
lines changed
0 commit comments