pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[RB] RenameMethodRefactoring next steps

Open Ducasse opened this issue 6 months ago • 2 comments

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 ]

Ducasse avatar Dec 31 '23 20:12 Ducasse

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

Ducasse avatar Jan 06 '24 15:01 Ducasse

For this the ReUpTo... should return violators.

Ducasse avatar Jan 06 '24 15:01 Ducasse