I normally use eclipse and for me is a good IDE.
Eclipse comes with a built-in Java formatter that is not compliance with the Java convention and for this reason I create a Java formatter available on github, click here to get the latest version.
In short my Java formatter:
- indent 4 spaces
- use space instead of the tab character
- split every row @ 80 characters per line
- format the Javadoc
- don't format comment
- try to be compliance with the Java and Google conventions
- pass verify of checkstyle
The following instructions and the formatter are tested for Eclipse Mars (version 4.5).
Instructions:
Clone git repository or download the Java formatter
Start eclipse
Search "formatter" in filter text input bar and then select Java → Code Style → Formatter
Click on "Import..." button and select the Java formatter, previously downloaded
Verify that "Java and Google Conventions - pirola.org" is the Active profile and click on "Apply"
Click and "OK"
That's all!!!
You can format your code in different ways:
All classes
Single class
Comments
No comments yet.Add Comment