Say I have
public class Person {
int id;
String regDate;
String name;
String surname;
// constructors, setters and getters and toString
If I rename id I want to rename it all across the class setters etc.
Currently I use ctr+f find replace, but that renames also my import statements and comments. 🙂
And also if I change type, lets say int to String for id I want type to be changed also all over the class(getters,setters,toString).
Thanks
Open the Outline view -> make sure that fields are visible (“Hide fields” icon at top cannot be pressed) -> select the field you want to rename -> Alt + Shift + R -> give a new name for fields / accessor -> check “Rename getter…” and “Rename setter” -> click “Ok”.
Regarding the second part of your question, this type of refactoring is probably currently unavailable because someone suggested it too on Eclipse Community Forums this year in this thread.