IntelliJ
Install and activate this plugin. Activation can be found under
File → Settings → Other Settings → google-java-format Settings
. Make sure the “Enable google-java-format”-checkbox is enabled.In
File → Manage IDE Settings → Import Settings
import the settings.zip file fromqa/intellij
. Import the templates and the macro.In
Settings → Editor → Code Style → Java
importtaskana_formatter_intellij.xml
fromtaskana/qa/intellij
.In
Settings → Keymap
search for “save all” and bindctrl+s
to the macro, thus overriding the save key. The macro will automatically format the current file and save all files.