Eclipse generates getters and setters do not encapsulate

When I quickly fix a field in eclipse, I can create a getter and setter for the field. It also makes the field private and subsequently converts all access for this field to all source files to use getter and setter. This applies to a single field.

However, if I do contextmenu> Source> Generate Getters and Setters ... (the ability to use when you want to affect all fields), it does not make the previous change, and all access to the fields in the source code remains as it is.

Am I missing something?

+5
source share
1 answer

A quick fix does not go to this menu. A menu in which a quick fix call is available fromContext Menu -> Refactor -> Encapsulate Field

+6
source

All Articles