...
Info |
---|
All images and settings shown in the following sections were taken on IntelliJ version: IDEA 2016.3.4 (and 2019.3.2 on MacOS) If you update the documentation please update the IntelliJ version as well! |
...
1. Install Eclipse Code Formatter plugin in intelliJ | Go to Files
-> Settings
-> Plugins
| Select Marketplace and search for Eclipse Code Formatter, then install it and restart your IntelliJ. For mac OS go to IntellijIDEA -> Preferences -> Plugins
2. Get OpenMRS Formatter XML file
...
Open the IntelliJ preferences like you did when you configured the formatter intellij-code-format
We are using the the Eclipse defaults eclipse-imports which are different from IntelliJ's!
...
If your class already has a Logger instance just place the cursor to where you want to log and type logd (for debug), logi (for info), ... hit Control+Space
(for the context menu) select the template and hit enter. Depending on what template you are using you might need to only enter your log message or also add a parameter after the message like for example for logpe (for logging an error and passing it an exception) or logpi (to log an info message using the slf4j parametrized message style like log.info("the temperatur was {}", temperatureObject) ).
...