Code style scheme for OpenMRS core and module developers who use IntelliJ IDEA. The scheme has two goals:
-
Java code formatting rules that follow the OpenMRS rules defined at OpenMRS Docs and, more specifically, by the formatting rules packaged in openmrs-tools
-
Java and XML formatting rules that match, where the aforementioned rules do not say otherwise, the default rules used by Eclipse
The code style scheme file has been verified to work on:
-
IDEA 14
-
IDEA 15
Importing the scheme set into IDEA is as simple as:
-
Copy the file openmrs-code-style-idea.xml under
<INTELLIJ_HOME>/config/codestyles/
-
Start/restart IDEA
-
Go to: Settings > Editor > Code Style
-
Select "openmrs-code-style-idea" from the Scheme drop down
On OSX you might find the codestyles folder at ~/Library/Preferences/IntelliJIdea15/codestyles
Pull requests and bug reports are welcome!