How do I undo the removal of a method in Squeak Smalltalk?
- 'World Menu'->'open'->'simple change sorter'
- In the top-right pane, select the class from which the method was removed.
- In the middle pane, select the removed method.
- Right click on the method name, bringing up a menu
- Select "versions"
- When the versions tool comes up, select the top (most recent) version, which is the one you deleted.
- Click the "revert" button
When you browse your class, you will see that the method is restored.
If you use OmniBrowser and the Refactoring Tools you have unlimited undo/redo on all your code changes like in any other modern editor. Select in the context menu Refactor > Undo.
You can open your changes file:
- Tools menu at the top of your screen.
- File List (which should open in the right place).
- In the upper right pane select the changes file (given an image called Foo.image, you'd look for Foo.changed).
- Hit the "recent changes" button, browsing as far back as the latest (top) snapshot.
- All method additions, alterations, deletions, DoIts are listed in the list that pops up.
- Select the method/s you want, right click (I can never remember the colours for mouse buttons) and "fileIn selections".