Java Code Style Guide - NASA-PDS/nasa-pds.github.io GitHub Wiki
PDS EN has chosen the Google Java Style Guide as our default style guide. As best as possible, try to adhere to this guide.
Java Code Formatter for Eclipse IDE
For integrating this styling into your development workflow for Eclipse:
- Download Google Style Guide profile: https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
- To set default
Format
functionality, open Eclipse and go toEclipse
>Settings
>Java
>Code Style
>Formatter
>Import
> Select downloadedeclipse-java-google-style.xml
. This sets your default formatting. - To apply style on
Clean up
, go toEclipse
>Settings
>Java
>Code Style
>Clean up
>Edit
> SelectFormat source code
. - To apply style on
Save
, go toEclipse
>Settings
>Editor
>Save Actions
> SelectPerform the selected actions on save
> SelectFormat Source Code
Java Code Formatter for IntelliJ IDEA
For integrating this styling into IntelliJ IDEA, follow the instructions here. Also, there is a more detailed article on configuring and using the code formatter in IntelliJ IDEA is available here.