-
Notifications
You must be signed in to change notification settings - Fork 20
Coding Convention
How to configure eclipse to standardize our indentation:
Purpose: This doc will tell you the current project indentation style, how to configure your eclipse IDE preferences to set your current indention setting to the current project style, and how to change the indentation within your current code to the new style without having to go line by line manually and change this.
Project style:
- Spaces only
- Indent two spaces
How to change your current indentation style in eclipse:
-
Navigate to: Eclipse/Preferences
-
Navigate in the preferences pane to: Java/Code Style/ Formatter
-
Click on “Edit” and then click “Indentation” on the window that pops up. Now in the “Profile name:” field enter a new profile name such as ‘Openbook Profile’.
Then select “spaces only” under the ‘tab policy’ menu and change the value in the “Indentation size:” and “Tab size:” field to 2.
-
Now click ‘Apply’ and then ‘Ok’
-
Now you should see your preferences window. Make sure that the “Active profile:” selected is your newly created profile. Then click “Apply” then “Ok” at the bottom of the preferences window to ensure your profile change is set.