Difference between revisions of "Setting up Eclipse"
From Knowitall
(Created page with "== For General Text Editing == # Go to "Window -> Preferences" to open up the Preferences window. # Navigate to "General -> Editors -> Text Editors" # Check "Insert spaces for t...") |
|||
Line 1: | Line 1: | ||
+ | Note that all the preferences below must be reset for each Eclipse Workspace. | ||
+ | |||
== For General Text Editing == | == For General Text Editing == | ||
Revision as of 17:52, 18 June 2012
Note that all the preferences below must be reset for each Eclipse Workspace.
For General Text Editing
- Go to "Window -> Preferences" to open up the Preferences window.
- Navigate to "General -> Editors -> Text Editors"
- Check "Insert spaces for tabs" and set "Displayed tab width" to 4.
Optional but recommended step: check "Show whitespace characters". You can choose which characters to display, as well as their opacity, by clicking on "whitespace characters" (should be highlighted).
For Java
- Go to "Window -> Preferences" to open up the Preferences window.
- Navigate to "Java -> Code Style -> Formatter".
- Create a new profile.
- Click "Edit".
- Under the "Indentation" tab, make sure that the "Tab Policy" is "Spaces only" and that "Indentation size"/"Tab size" are set to 4.
For Scala
- Go to "Window -> Preferences" to open up the Preferences window.
- Navigate to "Scala -> Formatter".
- Under the "Indentation & Alignment" tab, set "Spaces to indent" to 2 and make sure "Indent using tabs" is NOT checked.
- Navigate to "Scala -> Organize Imports".
- Click "collapse into single import statement".
Note that Ctrl+Shift+F will reformat the open file.