The formatter xml for Google Java Style for IntelliJ is published below. https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml So, download this first.
Import the downloaded "intellij-java-google-style.xml" into IntelliJ. Open the settings dialog, select "Editor"-> "Code Style"-> "Java", select "Import Scheme"-> "IntelliJ IDEA Code Stye XML" from the settings icon in Scheme, and download "intellij -java-". Import "google-style.xml". This completes the application to IntelliJ.
In some cases, you may want to change part of Google Java Style to something specific to your project (for example, indentation is space 4 etc.). In such a case, refer to IntelliJ Code Style and modify it as appropriate. Once the fix is complete, you will need to distribute this formatter to your team, so export and distribute it (Exporting is similar to the section "Importing formatters into IntelliJ", select Export and give it any name. Just export with).
that's all.
Recommended Posts