pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Add subclass driver

Open hernanmd opened this issue 1 year ago • 0 comments

This PR implements a first version of "Add subclass" refactoring as a driver:

https://github.com/pharo-project/pharo/assets/4825959/663878b5-19e6-4c7b-a0c8-bf097d2bab4a

Main features

  • The Spec UI to add a new subclass (see video above).
  • It checks and informs interactively if the class already exists.
  • It checks invalid class names.
  • Default class comment could be customized implementing blankCommentTemplate in the class selected as superclass.

Implementation notes

  • A RBAddNewClassRefactoring which differs from the Insert New Class refactoring in that does not reparent the subclasses to the new class.
  • The driver implementation in ReAddSubclassDriver and ReAddSubclassDriverTest.

Known issues

  • CmdCommandAborted signal and CmCommandAborted signal are failing right now and it should be investigated why (debugger keep opening which could mean the exception is not properly handled).
  • Next version will include more tests.

hernanmd avatar Mar 28 '24 16:03 hernanmd