This problem can be solve installing the google-java-format Plugin.

  1. Open plugins window (CTRL+Shift+A): plugins

  2. Click on browse repositories.

  3. Search for google-java-format

  4. Install the plugin.

  5. Restart the IDE.

  6. Enable the plugin executing the action (Ctrl+Shift+A): Reformat with google-java-format Update: in the newer version of the plugin select Reformat since the plugin overrides / enhances the functionality of the standard "Reformat" command.

Additional notes from the google-java-format README

The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox. (A notification will be presented when you first open a project offering to do this for you.)

To enable it by default in new projects, use File→Other Settings→Default Settings....

Answer from Geekecom on Stack Overflow
🌐
GitHub
github.com › google › styleguide › blob › gh-pages › intellij-java-google-style.xml
styleguide/intellij-java-google-style.xml at gh-pages · google/styleguide
Style guides for Google-originated open-source projects - styleguide/intellij-java-google-style.xml at gh-pages · google/styleguide
Author: google
🌐
GitHub
github.com › google › google-java-format
GitHub - google/google-java-format: Reformats Java source code to comply with Google Java Style. · GitHub
August 14, 2026 - A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins category.
Author: google
🌐
GitHub
raw.githubusercontent.com › google › styleguide › gh-pages › intellij-java-google-style.xml
<?xml version="1.0" encoding="UTF-8"?> <code_scheme name="GoogleStyle">
<?xml version="1.0" encoding="UTF-8"?> <code_scheme name="GoogleStyle"> <option name="OTHER_INDENT_OPTIONS"> <value> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="4" /> <option name="TAB_SIZE" value="2" /> <option name="USE_TAB_CHARACTER" value="false" ...
🌐
GitHub
github.com › pmendelski › intellij-codestyle
GitHub - pmendelski/intellij-codestyle: Google based java code style for IntelliJ
Google based java code style for IntelliJ. Contribute to pmendelski/intellij-codestyle development by creating an account on GitHub.
Starred by 6 users
Forked by 5 users
🌐
Google
google.github.io › styleguide › intellij-java-google-style.xml
intellij-java-google-style.xml
xmlns:android · xmlns:.* · BY_NAME · *:id · http://schemas.android.com/apk/res/android · style · *:.*Style
🌐
GitHub
github.com › going-magic › google-java-style-intellij
GitHub - going-magic/google-java-style-intellij: Installing the coding style settings in Intellij
Download the intellij-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repository.
Author: going-magic
Find elsewhere
Author: frellan
🌐
GitHub
github.com › darcyliu › google-styleguide › blob › master › intellij-java-google-style.xml
google-styleguide/intellij-java-google-style.xml at master · darcyliu/google-styleguide
Mirror of "Style guides for Google-originated open-source projects" - google-styleguide/intellij-java-google-style.xml at master · darcyliu/google-styleguide
Author: darcyliu
🌐
Medium
medium.com › swlh › configuring-google-style-guide-for-java-for-intellij-c727af4ef248
Configuring Google Style Guide for Java for IntelliJ | by Reed Odeneal | The Startup | Medium
November 16, 2020 - Next to the Scheme drop-down menu select the gear icon then Import Scheme > IntelliJ IDEA code style XML then select the intellij-java-google-style.xml file you downloaded from GitHub.
🌐
GitHub
github.com › HPI-Information-Systems › Metanome › wiki › Installing-the-google-styleguide-settings-in-intellij-and-eclipse
Installing the google styleguide settings in intellij and eclipse
May 12, 2019 - Download the intellij-java-google-style.xml file from https://raw.githubusercontent.com/google/styleguide/gh-pages/intellij-java-google-style.xml.
Author: HPI-Information-Systems
🌐
GitHub
github.com › google › styleguide › issues › 437
Parser intellij-java-google-style.xml to .editorconfig file · Issue #437 · google/styleguide
February 19, 2019 - Hi, I'd like to use an .editorconfig file with the same configuration of intellij-java-google-style.xml I'd like to know if this .editorconfig configured with this style already exist, or if not, could we do this translation from xml to ...
Author: google
🌐
GitHub
github.com › google › styleguide › issues › 687
eclipse-java-google-style.xml and intellij-java-google-style.xml are obsolete and should be removed · Issue #687 · google/styleguide
April 25, 2022 - Both eclipse-java-google-style.xml and intellij-java-google-style.xml were last updated 4 years ago and are effectively obsolete. Google has moved its focus to google-java-format because “Eclipse and IntelliJ IDEA weren’t flexible enough...
Author: google
🌐
GitHub
github.com › BrightProgrammer7 › FORMAT-JAVA-CI › issues › 4
Guide: Reformat Java Code with Google Style Guide in IntelliJ IDE · Issue #4 · BrightProgrammer7/FORMAT-JAVA-CI
August 21, 2024 - To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox.
Author: BrightProgrammer7
🌐
GitHub
github.com › hferreiro › google-java-format
GitHub - hferreiro/google-java-format: Reformats Java source code to comply with Google Java Style. · GitHub
A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins category.
Author: hferreiro
🌐
GitHub
github.com › google › google-java-format › issues › 325
Unable to import Code "IntelliJ Java Google Style" · Issue #325 · google/google-java-format
November 29, 2018 - Running into error following the below step -> "The import ordering is not handled by this plugin, unfortunately. To fix the import order, download the IntelliJ Java Google Style file and import it into File→Settings→Editor→Code Style." ...
Author: google
🌐
DEV Community
dev.to › tschaka1904 › intellij-google-java-format-plugin-vs-intellij-java-google-style-xml-what-s-the-deal-197b
IntelliJ google-java-format plugin vs IntelliJ java-google-style.xml - what's the deal? - DEV Community
October 16, 2019 - It surprises me as both, the XML and the plugin, are maintained by Google (or at least under their GitHub organisation). ... Could it be an issue with IntelliJ or the XML that the formatting is so different between the two options? Which one is right or closer to the actual Google Style guide? Is there a different tool, which is reliable for a reliable code formatting for Java?