Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undoing removal of methods in Squeak Smalltalk

How do I undo the removal of a method in Squeak Smalltalk?

like image 295
Edward Ocampo-Gooding Avatar asked Jun 25 '12 01:06

Edward Ocampo-Gooding


3 Answers

  1. 'World Menu'->'open'->'simple change sorter'
  2. In the top-right pane, select the class from which the method was removed.
  3. In the middle pane, select the removed method.
  4. Right click on the method name, bringing up a menu
  5. Select "versions"
  6. When the versions tool comes up, select the top (most recent) version, which is the one you deleted.
  7. Click the "revert" button

When you browse your class, you will see that the method is restored.

like image 59
Sean DeNigris Avatar answered Sep 19 '22 21:09

Sean DeNigris


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.

like image 28
Lukas Renggli Avatar answered Sep 19 '22 21:09

Lukas Renggli


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".
like image 34
Frank Shearar Avatar answered Sep 18 '22 21:09

Frank Shearar