pharo
pharo copied to clipboard
Add subclass driver
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
blankCommentTemplatein the class selected as superclass.
Implementation notes
- A
RBAddNewClassRefactoringwhich differs from the Insert New Class refactoring in that does not reparent the subclasses to the new class. - The driver implementation in
ReAddSubclassDriverandReAddSubclassDriverTest.
Known issues
-
CmdCommandAborted signalandCmCommandAborted signalare 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.