Many questions regarding this issue can be found, for example this and this. But none of them are really solves the issue that how to run the plugin to reformat java code against java google format code style
Download and import intellij-java-google-style.xml to intellij only partly solves the issue, because using the code schema will not be 100% match against code formatted with the actual google code formatter. This is very annoying when using git hook for format check when commit.
The currently intelliJ IDEA I'm using is 2018.3.4 community version
Question 1:
How can I create a hot key combination, for example: Ctrl+Shift+J, to run the code format? I did a similar configuration for scala code format according to this question, and it works fine. The different thing is, the scala format plugin comes with a default mapping key, I changed the key combinations rather than create any.
Question 2:
Is that means any new lines will be automatically formed according to the google java code style after installed and enabled the google-java-format Plugin for intellij IDEA
Question 3:
When multiple code format plugins were installed, is that means the code format will be automatically applied to the corresponding code files? or further configuration is needed?