Eclipse field refactoring

When I rename a variable in eclipse using Ctrl + 1, it does not rename the getter / setter methods. Is there a way to rename methods.

+5
source share
3 answers

Use Alt+Shift+Rin the desired field. In the dialog that appears, select "Open Rename Dialog" and check the corresponding boxes.

+9
source

Rename the field using Refactor> Rename and select "open rename dialog" in the tooltip. Or, more simply, press Ctrl + R twice.

In the rename dialog box, you can also rename the getter and field installer.

, getter Rename setter inline-rename .

Rename dialog in Eclipse 3.7

+9

Select Field - > right click - > Refactor-> encapsulate field.

+5
source

All Articles