This is a really nice Eclipse feature:

createRefactoringScript