Last Site Update: 25 April 2005 | Latest Version: 0.9.3

 
Features Editor Debugger Code Completion Templates
Code Coverage Content Assistants Refactoring Tasks PyLint
 
 
Home
Features
Editor
Debugger
Code Completion
Templates
Code Coverage
Content Assistants
Refactoring
Tasks
PyLint
Roadmap
Screenshots
Download
Credits
More info
FAQ / BUGS
Users List (code)
Users Forum
Fabio Zadrozny Blog
Aleks Totic Blog
Hosted at
PyDev at Sourceforge
Donate
Sponsored by
 

Refactoring - powered by: bicycle repair man

Refactor Examples (activates on right mouse click - there is usually a keyboard key that emulates that):

On:

class C:
....def a(self):
........a = 2
........b = 3
........c = a+b #this should be refactored.
........return c
c = C()

Marking 'a+b' and making an extract method refactor for a method called 'plusMet' should give you:

class C:
....def a(self):
........a = 2
........b = 3
........c = self.plusMet(a, b) #this should be refactored.
........return c

....def plusMet(self, a, b):
........return a+b
c = C()



And with the same class, marking C (it must be the class definition) should give you:
class G:
....def a(self):
........a = 2
........b = 3
........c = a+b #this should be refactored.
........return c
c = G()

Until now, extract method has given me no problems, but rename does not always work... It has to scan all the PYTHONPATH and does not always find all the references (and sometimes may have problems parsing some files too...)

Methods or variables can be renamed too.

And as a helper, a Refactor Results View has been contributed. After any refactoring it should show which files were changed.