Skip to content

Commit 1e66e7f

Browse files
authored
make label for the code action for extracting a local module to a separate file clearer (#996)
1 parent 87bf5bd commit 1e66e7f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

analysis/src/Xform.ml

+4-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ module ModuleToFile = struct
173173
in
174174
changed :=
175175
Some
176-
(CodeActions.makeWithDocumentChanges ~title:"Extract module as file"
176+
(CodeActions.makeWithDocumentChanges
177+
~title:
178+
(Printf.sprintf "Extract local module \"%s\" to file \"%s\""
179+
moduleName (moduleName ^ ".res"))
177180
~kind:RefactorRewrite
178181
~documentChanges:
179182
[

analysis/tests/not_compiled/expected/DocTemplate.res.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module T = {
6969
let b = 1
7070
// ^xfm
7171
}
72-
Hit: Extract module as file
72+
Hit: Extract local module "T" to file "T.res"
7373

7474
CreateFile: T.res
7575

@@ -100,7 +100,7 @@ newText:
100100

101101
*/
102102
let b = 1
103-
Hit: Extract module as file
103+
Hit: Extract local module "T" to file "T.res"
104104

105105
CreateFile: T.res
106106

analysis/tests/src/expected/Xform.res.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ newText:
168168
}
169169

170170
Xform src/Xform.res 72:5
171-
Hit: Extract module as file
171+
Hit: Extract local module "ExtractableModule" to file "ExtractableModule.res"
172172

173173
CreateFile: ExtractableModule.res
174174

0 commit comments

Comments
 (0)