@@ -23,9 +23,9 @@ function renamerefactor(
23
23
mod = getmodule (mod)
24
24
25
25
# catch field renaming
26
- modulenote = if (obj = first (split (full, ' .' ))) != old
26
+ modnote = if (obj = first (split (full, ' .' ))) != old
27
27
if (parentmod = getfield′ (mod, obj)) isa Module && parentmod != mod
28
- " **NOTE**: ` $ old` is defined in ` $ parentmod` -- you may need the same rename refactorings in that module as well. "
28
+ modulenote ( old, parentmod)
29
29
else
30
30
return Dict (:warning => " Rename refactoring on a field isn't available: `$obj .$old `" )
31
31
end
@@ -53,15 +53,14 @@ function renamerefactor(
53
53
if val isa Undefined && Symbol (old) in keys (Docs. keywords)
54
54
return Dict (:warning => " Keywords can't be renamed: `$old `" )
55
55
end
56
- # update modulenote
57
- if isempty (modulenote) && applicable (parentmodule, val) && (parentmod = parentmodule (val)) != mod
58
- modulenote =
59
- " **NOTE**: `$old ` is defined in `$parentmod ` -- you may need the same rename refactorings in that module as well."
56
+ # update modnote
57
+ if isempty (modnote) && applicable (parentmodule, val) && (parentmod = parentmodule (val)) != mod
58
+ modnote = modulenote (old, parentmod)
60
59
end
61
60
kind, desc = globalrefactor (old, new, mod)
62
61
return Dict (
63
62
kind => kind === :success ?
64
- join ((" _Global_ rename refactoring `$old ` ⟹ `$new ` succeeded." , modulenote , desc), " \n\n " ) :
63
+ join ((" _Global_ rename refactoring `$old ` ⟹ `$new ` succeeded." , modnote , desc), " \n\n " ) :
65
64
desc
66
65
)
67
66
catch err
@@ -71,6 +70,9 @@ function renamerefactor(
71
70
return Dict (:error => " Rename refactoring `$old ` ⟹ `$new ` failed" )
72
71
end
73
72
73
+ modulenote (old, parentmod) =
74
+ " **NOTE**: `$old ` is defined in `$parentmod ` -- you may need the same rename refactorings in that module as well."
75
+
74
76
# local refactor
75
77
# --------------
76
78
@@ -127,9 +129,9 @@ function refactorfiles(old, new, mod, files)
127
129
@info " Finish global rename refactoring" progress= 1 _id= id
128
130
129
131
return if ! isempty (refactoredfiles)
130
- filelist = (" - [$file ](atom://julia-client/?open=true&file= $( file)&line=0 )" for file in refactoredfiles)
132
+ filelist = (" - [$file ]($( uriopen ( file)) )" for file in refactoredfiles)
131
133
(:success , string (" Refactored files (all in `$mod ` module):\n\n " , join (filelist, ' \n ' )))
132
134
else
133
- (:warning , " No rename refactoring occured on `$old `" )
135
+ (:warning , " No rename refactoring occured on `$old ` in ` $mod ` module. " )
134
136
end
135
137
end
0 commit comments