March 3, 2019

Eclipse, tab to space



Use spaces instead of tabs:
  1. Windows > Preferences > Java > Code Style > Formatter > New (create new profile)
  2.  Edit > "Tab policy" > "Space only" > [OK]
  3. Windows > Preferences > General > Editors > Text Editors > "Insert spaces for tabs" > [Apply and Close]

Replaces tab with spaces when save:
  1. Windows > Preferences > Java > Editor > Save Actions
  2. [X] Additional Actions > [Configure] > Formatter [X] Correct indentation 
  3. [OK] > [Apply and Close]

No comments: