April 29, 2019

Eclipse Java and HTML Code Formatter

This Code Formatter is used for Eclipse Version 2018-09 (4.9.0) and above.

1. Download the following files:




2. Open Eclipse

3. Go to Windows → Preferences → Java → Code Style → Clean Up


4. Click Import and select eclipse_clean-up.xml, click Apply.

5. Go to Windows → Preferences → Java → Code Style → Formatter


6. Click Import and select eclipse_formatter.xml, click Apply.

7. Go to Windows → Preferences → Java → Editor → Save Action
Setup as following:


8. Go to Windows → Preferences → Web → Editor → HTML Files → Editor
Set the following parameters:
  • Line width = 80
  • Check “Split multiple attributes each on a new line”
  • Click “Indent using spaces”
  • Indentation size = 4



9. Go to Windows → Preferences → Web → JavaServer Faces Tools → Validation 
Set "Applying operator to method binding" to Warning or Ignore


No comments: