The Java editor allows you to generate accessors ("getters and setters") for the fields of a type inside a compilation unit.
1. |
Ensure that the Outline view is visible. |
2. |
Open a Java editor for the file in which you want to generate accessors. The Outline view displays the contents of the file. |
3. |
In the Outline view, select the field for which you want to generate accessors. |
4. |
From the field's context menu in the Outline view, select Generate Getter and Setter. |
5. |
If possible, the accessors are generated, and you see them in the Outline view and the editor. |