Skip to content
chris-cale edited this page Feb 24, 2012 · 5 revisions

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: 1. Navigate to: Eclipse/Preferences 2. Navigate in the preferences pane to: Java/Code Style/ Formatter 3. 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. 4. Now click ‘Apply’ and then ‘Ok’ 5. 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.

Clone this wiki locally