
Ruby Refactoring Plug-in for Eclipse
Team:
Initial Status
Ruby is a dynamically typed, object oriented programming lanugage, that boomed enormously in recent years, mostly because of the web framework Rails. The support to the developer through a powerful integrated development environment is still in its infancy. There are several editors, which mostly don't provide more than syntax highlighting, code outline and a rudimentary project management. There is no environment that provides anything like automated refactorings.
The Ruby Development Tools (RDT), based on the Eclipse platform, is a relative highly developed Ruby development environment. RDT is also the basis for the Rails plug-in RadRails.
Aims
The aim of the Ruby Refactoring Project is to provide a wide variety of refactorings for the development environment RDT.
Results
During the very successful project work, the following refactorings were implemented:
- Convert Local Variable to Field
- Encapsulate Field
- Extract Method
- Move Method
- Move Field
- Split Temporary Variable
- Inline Method
- Inline Class
|
- Inline Temp
- Merge Class Parts
- Rename Class
- Rename Field
- Rename File
- Rename Local Variable
- Rename Method
- Rename Module
|
Feedback
Daniel Spiewak of EclipseZone wrote:
First class Ruby refactoring is probably the most vaunted feature in RDT 0.9 and I must admit, it's very impressive. In this area, DLTK simply can't compare (it doesn't have any refactoring support yet). I was able to rename classes, methods, variables, mark occurrences (not really a refactoring, but it requires the same AST), and even wrap a code block in a method (I thought that one was pretty cool). There are even more refactorings, but you get the picture.
Links

Screencasts
Documentation
Download and Installation
Our refactoring plug-in is integrated into RDT. So to get our refactorings, you can just download RDT/RadRails from the Update Site http://update.aptana.com/install/rails/3.2/. To install RadRails you also need two Aptana plug-ins. You can get them from http://update.aptana.com/install/3.2 (the simplest way it to get updates for both Update Sites together and hit "Select Required" to check the Aptana plug-ins).
The current version of our refactorings (that is not integrated into RDT/RadRails) contains some additional features:
- Renaming will also rename files that correspond to a class name.
- When a file is renamed, require statements in the same project will be renamed too.
- Comment blocks are correctly handled an thus moved along with the code they belong to.
- Refactoring help was created.
You can get them from our Update Site http://ifs.hsr.ch/rubyrefactoring/updatesite/ (the refactorings contained in RDT will be replaced because the version number in ours is higher).