Is it possible to change the default code format settings?

Yes, to change the default code format settings:

  1. From the IDE menu bar, select Window > Preferences.

    The Preferences dialog box appears.

  2. Type code as the filter text to narrow down the list of preferences.
  3. Select Code Style in the left pane to modify the code formatting.
    Figure 1. Code Style Preference Page

    Code Style Preference Page

  4. Select a predefined profile from the Select a profile drop-down list. Each of the profile specify different ways of formatting the code.

    If the predefined profiles does not suit your requirements, you can create a new profile.

    1. Click the New button.

      The New Code Formatter Profile dialog box appears.

    2. Enter the name of the new profile in the Profile name text box.
    3. Select the profile based on which you want to create the new profile from the Initialize settings with the following profile drop-down list.
    4. Click OK.

      The edit dialog box appears.

    5. Specify the code formatting settings as required and click OK.
  5. Click OK to close the Preferences dialog box.

The editor will now use the selected profile to format the code.