pharo
pharo copied to clipboard
[RB] RenameMethodRefactoring next steps
We should revisit the logic behind the argument permutation in presence of primitives. I think that when the method changed is polymorphic to one primitive we should not allow the permutation but I may be wrong.
We will have to look at forbiding argument permutation on primitives Right now this is obscure.
implementorsCanBePrimitives
^self hasPermutedArguments not
Check the duplicated logic - two methods about the
areArgumentsPermuted
^ (permutation asArray = (1 to: oldSelector numArgs) asArray ) not
and
hasPermutedArguments
"We will have to unify with areArgumentsPermuted"
^ hasPermutedArguments
ifNil: [ hasPermutedArguments := super hasPermutedArguments ]
ifNotNil: [ hasPermutedArguments ]
In addition we could display a list of choices similar to the RemoveClass ones. We could have
- Do it even if overriding methods
- Browse overriden methods
- Do it and browse
For this the ReUpTo... should return violators.