google-java-format plugin should intercept the “Reformat Code” action in IDEA (Ctrl+Alt+L) and apply its own rules. However, it does not work with imports for some reason, so to fix that you have to import a Java Google Code Style XML file to your c
1.open the eclipse tool window First click the Window menu,then check the children's menu which named Preferences,the end you can see Preferrences view. And you can find the Java text contents open the Code Style item,and you can see the Code Templa
In order to make the codes looks unified and make it easy to understand, it's better to use the same formatter for our code, the xml is the standard formatter, you can apply it to your STS. open STS -> Window -> type “formatter” -> choose Java -