Apply Google Java Style formatter in IntelliJ

Download intellij-java-google-style.xml

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 formatter to IntelliJ

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.

Customize the formatter to be project-specific

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

Apply Google Java Style formatter in IntelliJ
Google Java Style Guide
Get Google Cloud Storage object list in Java
Facade pattern in Java
Singleton pattern in Java
Flyweight pattern in Java
Observer pattern in Java
Linux permissions in Java
Use DataFrame in Java
Iterator pattern in Java
Decorator pattern in Java
Prototype pattern in Java
Proxy pattern in Java