Hello Mirko,

On Jan 25, 2006, at 4:21 PM, Markus Barchfeld wrote:

Mirko Stocker wrote:

Hi!

First, I wanted to thank you for the RDT, they are really great :-) Second, my question: I'm a student at the University of Applied Science in Rapperswil, Switzerland. The next semester, we have to do a software-engineering project (about ~200 working hours), and I thought I could (try to) bring refactoring support to the RDT. But I wanted to talk to you guys first, are you already working at this? Do you think it's even doable? What do you think about it?


I think it's great. And no, no one is actively working on it.

Of course there have been discussion about implementing refactoring in the past. We would really appreciate if you started to work on the issue. It is doable in the meantime: since release 0.6.0 we have integrated the jruby parse which delivers quite detailed information about the ruby code (an AST). We already use it for folding and searching and refactoring would be the next step.

Although refactoring in a dynamically typed language is certainly more of a challenge than in statically typed language, it is worth trying. Just consider "rename method" in the following example:

class A
 def m
 end
end

A.new.m

I'd agree with Markus - any sort of refactoring support for RDT would be a huge gain for our users. Just to try and temper expectations a bit - with Ruby being a dynamic language, advanced refactorings would become rather complex and perhaps technically impossible (to get it 100% correct). But certainly progress could be made in localized refactorings: - rename a method argument/parameter and all it's occurences within the scope of the method - rename a method within a file [without regard to other files which may call it, or possibly variables of unknown/dynamic type who call it]
- rename an instance variable
- extract a constant
- etc.

More advanced refactorings may need to take an approach similar to the original Smalltalk paper's suggestions. From what I recall they implemented method renames by adding code to the original method that would rewrite the caller's code to point to the new method name when called. Then they ran a comprehensive test suite to try and execute all possible calls, and then took out the old method.

Thanks,
Chris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Rubyeclipse-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development

Reply via email to