# Code style

The Code style preference page allows to configure naming conventions, style rules and comment settings. These preferences are used when new code has to be generated.

## Naming Conventions

The list defines the naming conventions for fields (static and non-static), parameters and local variables. For each variable type it is possible to configure a list of prefix or suffix or both.
Naming conventions are used by all actions and 'Quick Fix' proposals that create fields, parameters and local variables, in particular the Source actions.

Action | Description
--- | ---
Edit... | Opens a dialog to edit the list of prefix and suffixes for the currently selected variable type

## Code Conventions

The following settings specify how newly generated code should look like. The names of getter methods can be specified as well as the format of field accesses, method comments, annotations and exception variables.

Action | Description | Default
--- | --- | ---
Qualify field accesses with 'this' | If selected, field accesses are always prefixed with 'this', regardless whether the name of the field is unique in the scope of the field access or not. | Off
Use 'is' prefix for getters returning boolean | If selected, the names of getter methods of boolean type are prefixed with 'is' rather than 'get'. | On
Add comments for new methods and types | If selected, newly generated methods and types are automatically generated with comments where appropriate. See the Code templates preference page to specify the format of the generated comments. | Off
Add '@Override' annotation for overriding methods | If selected, methods which override an already implemented method are annotated with an '@Override' annotation. See the Compiler preference page for settings related to annotations. | On
Exception variable name in catch blocks | Specify the name of the exception variable declared in catch blocks. | e

Source actions
Java editor
Java editor preferences
Java compiler preferences
Code templates preferences