gtoolkit icon indicating copy to clipboard operation
gtoolkit copied to clipboard

RBRenameMethodRefactoring does not use the cache when computing sender/implementors

Open chisandrei opened this issue 2 years ago • 4 comments

This iterates over implementors/senders instead of using the cache.

refactoring := ( RBRenameMethodRefactoring
		renameMethod: #haba 
		in: Object 
		to: #haba2 
		permutation: #())
refactoring primitiveExecute

chisandrei avatar Jul 12 '22 10:07 chisandrei

In a plain GT:

Screen Shot 2022-07-12 at 12 48 15 PM

girba avatar Jul 12 '22 10:07 girba

One solution is to hook an enhanced RBNamespace implementation in GtRenameController>>#createModel.

/cc @j-brant @refactoringdr

girba avatar Jul 12 '22 11:07 girba

With the default RBNamespace:

Screen Shot 2022-07-12 at 7 13 37 PM

With GtRBNamespace: (implementers and references no longer appear )

Screen Shot 2022-07-12 at 7 14 05 PM

girba avatar Jul 12 '22 17:07 girba

Enable the new implementation with:

RBClassModelFactory setRBNamespace: GtRBNamespace

girba avatar Jul 12 '22 19:07 girba