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

Clarify label for code action for extracting a local module #996

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion analysis/src/Xform.ml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ module ModuleToFile = struct
in
changed :=
Some
(CodeActions.makeWithDocumentChanges ~title:"Extract module as file"
(CodeActions.makeWithDocumentChanges
~title:
(Printf.sprintf "Extract local module \"%s\" to file \"%s\""
moduleName (moduleName ^ ".res"))
~kind:RefactorRewrite
~documentChanges:
[
Expand Down
4 changes: 2 additions & 2 deletions analysis/tests/not_compiled/expected/DocTemplate.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module T = {
let b = 1
// ^xfm
}
Hit: Extract module as file
Hit: Extract local module "T" to file "T.res"

CreateFile: T.res

Expand Down Expand Up @@ -100,7 +100,7 @@ newText:

*/
let b = 1
Hit: Extract module as file
Hit: Extract local module "T" to file "T.res"

CreateFile: T.res

Expand Down
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Xform.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ newText:
}

Xform src/Xform.res 72:5
Hit: Extract module as file
Hit: Extract local module "ExtractableModule" to file "ExtractableModule.res"

CreateFile: ExtractableModule.res

Expand Down
Loading