# HG changeset patch # User Claus Gittinger # Date 1545132823 -3600 # Node ID 92c95959de025441a9e5d3b4e587d59909dabffa # Parent 76121368cd6e5311a1e6a9f62831af2c92456075 #BUGFIX by cg class: Tools::NewSystemBrowser changed: #moveOrCopyMethods:toClass:moveOrCopy: preserve packageID when moving methods within a package diff -r 76121368cd6e -r 92c95959de02 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