Setting up Code style for Eclipse
On Windows: Go to Window/Preferences/Java/Code style/Formatter
On Mac: Go to Eclipse/Preferences/Java/Code style/Formatter
- To create a new profile based on the eclipse built in
- Click the new ... button
- give it a name like cs49j
- In indentation,
- Set Tab policy to Spaces Only. You can still use tabs but they will be converted to spaces. That way you code will look the same in any text editor
- Set indientation size and tab size to 3.
- In Braces: Set all except the last 2 to next line. Click OK
- Be sure your new profile is the active profile
- Click OK