#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Tue, 18 Dec 2018 12:33:43 +0100
changeset 18549 92c95959de02
parent 18548 76121368cd6e
child 18550 8de40a119c04
#BUGFIX by cg class: Tools::NewSystemBrowser changed: #moveOrCopyMethods:toClass:moveOrCopy: preserve packageID when moving methods within a package
Tools__NewSystemBrowser.st
--- 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