Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming accessor/mutator methods in Eclipse?

Is there any way to automatically rename accessor/mutator when a variable they get/set gets refactored -> renamed (Eclipse 3.4)?

like image 661
yanchenko Avatar asked Oct 13 '08 09:10

yanchenko


1 Answers

1 - When you select Refactor->Rename on a variable, Eclipse prompts you to enter the new name in an "in-line" box. Directly below it, there is a help message and next to it a small icon (an arrow going down).Click on that arrow and then select "Open Rename Dialog". A new pop-up appears with the checkboxes you need.

2 - Alternatively, select the variable you want to change and press twice Alt+Shift+R. Again check the getter/setter checkboxes.

like image 51
idrosid Avatar answered Oct 11 '22 13:10

idrosid