Reddy Reddy - 6 months ago 35
Java Question

Need to refactor field names in eclipse which should change getters/setters as well

I need to do lot of refactoring (actually need to change field names) in eclipse. It is changing all occurrences, references of fields. But one thing is it is not changing getter/setter names which have been generated based on previous name.

Do we have any plugin to do this or any configuration change needed to be done?


Yes, in Galileo the "rename" dialog has an option for changing the setters and getters of a field - see here. (Alternatively, you can use ALT + SHIFT + R twice after selecting the field)

Before Galileo, you'd have to do 3 actions instead of one (not that bad)