đ Coding style
đ Java coding styleâ
1ī¸âŖ IntelliJ IDEA Code style setupâ
We have defined a common coding style which we follow while writing Java code. The defined code formatter can be found at core-java/code-formatter
directory. You need to import the formatter from the mentioned directory in your IntelliJ IDEA properties.
- Open IntelliJ IDEA preferences window, go to
Editor
->Code Style
and click on 3 dots. - Select
Import Schema
->IntelliJ IDEA code style XML
from the options and select theboyka-formatter.xml
file from the path mentioned above. - Now click on
Apply
andOK
buttons.
2ī¸âŖ Save Action plugin settingsâ
In your IntelliJ IDEA, add Save Actions
plugin to your project. This plugin is used to format code files on save when working on the Java project.
To configure the plugin, open IntelliJ IDEA preferences window and expand Other Settings
and select Save Actions
.
A window similar to the following will be displayed, select all the options demonstrated here in the following screenshots.
Now after scrolling, select the following options shown in this screenshot.
Now click on Apply
and OK
buttons.