Generating getters and setters
The Java editor allows you to generate accessors ("getters and setters") for the fields of a type inside a compilation unit.
- In the editor, select the field for which you want to generate accessors (or a type in which you want to create these methods).
- Select Generate Getter and Setter from the Source pop-up menu.
- A dialog will open to let you select which methods you want to create.
- Select the methods and press OK.
Using the Java editor
Creating a class in an existing compilation unit