#BUGFIX by cg
class: Tools::NewSystemBrowser
changed: #moveOrCopyMethods:toClass:moveOrCopy:
preserve packageID when moving methods within a package
--- a/Tools__NewSystemBrowser.st Mon Dec 17 13:16:07 2018 +0100
+++ b/Tools__NewSystemBrowser.st Tue Dec 18 12:33:43 2018 +0100
@@ -48692,7 +48692,7 @@
"/ the old code always preserved the method's package,
"/ which leads to confusion and creates extra work most of the time (move to class's package)
"/ Now, we only do it, if the method was an extension.
- isExtensionMethod ifTrue:[
+ (isExtensionMethod or:[newClass package == oldProject]) ifTrue:[
canUseRefactoringSupport ifTrue:[
changes
changeProjectOf:selectorToCopyOrMove
@@ -48737,7 +48737,7 @@
"/ the old code always preserved the method's package,
"/ which leads to confusion and creates extra work most of the time (move to class's package)
"/ Now, we only do it, if the method was an extension.
- isExtensionMethod ifTrue:[
+ (isExtensionMethod or:[newClass package == oldProject]) ifTrue:[
canUseRefactoringSupport ifTrue:[
changes
changeProjectOf:selectorToCopyOrMove
@@ -48756,6 +48756,8 @@
(canUseRefactoringSupport and:[anyChangeMade]) ifTrue:[
RefactoryChangeManager performChange: changes
].
+
+ "Modified: / 18-12-2018 / 12:10:07 / Claus Gittinger"
!
renameMethod:oldSelector in:aClass