0

I'm using IBM RAD 9.0. When I enter Refactoring dialog on the field name (2x alt+ctrl+R) I see the options to rename getters and setters disabled.

I can't find any setting that would disable that options. I've used refactoring of field names a lot in normal Eclipse, being forced to refactor the field name 3 times (for field, for setter and for getter) is a big time loss.

What can cause disabling/enabling that refactoring options in rename field dialog?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Danubian Sailor
  • 1
  • 38
  • 145
  • 223

1 Answers1

1

I'm not sure I'm following your scenario, but this is what I do

  1. Highlight the field name
  2. Open Rename field dialogue. Either use Crtl + Alt + R
  3. Change the name of the field
  4. Check Rename getter and setter.

Keep in mind that if you don't have the getter and setter already in the file, or the getter and setter name doesn't match the convention, the Rename options will be disabled. In this case use Generate getter and Setter dialogue

  1. Right-click the field
  2. Select Source > Generate Getter and Setters
  3. Select the fields for which you want to generate the getters and setters, if not already.
  4. Click OK.

Hope this helps, if no, please add more details to the problem

Danubian Sailor
  • 1
  • 38
  • 145
  • 223
Victor Sosa
  • 388
  • 1
  • 14
  • There were getters and setters, but they were manually (sic!) created and they didn't fully match the camel case convetion. They had very poor names, therefore such thing was possible. It's not surprising, if the quality of the code weren't poor, I wouldn't want to refactor it in the first line. – Danubian Sailor Oct 02 '14 at 07:12