New Refactorings

In this screencast (2.1 MB) I present 3 new refactorings that were are not part of the original refactoring browser. I use these refactorings on a daily bases and I think that they are a huge time saver.

Update: The refactorings presented in this screen-cast are the following ones:

  • Create accessors for class: This is a composite refactoring that uses the existing accessor refactoring to create accessors for all instance-variables.
  • Realize class: This refactoring overrides all abstract methods of the superclasses with a method that calls #shouldBeImplemented.
  • Move method to class/instance side: This refactoring moves the selected method from class- to instance-side or vice-versa.
Posted by Lukas Renggli at 18 March 2008, 8:59 am with tags pharo, squeak, refactoring, omnibrowser, screencast link


Hey Lukas, can you name and list these refactorings? Not that I’m def or blind or so, but just for convenience...

Posted by a3aan at 18 March 2008, 9:15 pm link

For the search engines and for you I updated the the post with a listing and a short description of the new refactorings.

Posted by Lukas Renggli at 18 March 2008, 9:28 pm link

Awesome, the browser is really starting to get nice. Have you written up anything on using the new code critic yet? I fired it up yesterday but couldn’t figure the damn thing out. I also really miss being able to create an accessor for an instance variable by right clicking the instance variable definition and create accessors. Seems odd to have to right click the class, then choose instance variable, then select the right one from a big list. Anyway, great work, keep it up!

Posted by Ramon Leon at 19 March 2008, 5:33 am link

Ok, then the code critic is the next thing I am going to make a screen-cast on. Currently not all refactorings are not as context sensitive as I would like them to be (this seems to be a bit tricky to do with OB). If you take the latest version of OB-Refactory, it should be possible to select an inst-var name in the class definition or the source code and create accessors for that.

Posted by Lukas Renggli at 19 March 2008, 7:51 am link