Add code style settings for IntelliJ
Change-Id: Ib444fb91f19ef69218dad7a9cb8dda4f072c508f
This commit is contained in:
@@ -43,6 +43,30 @@ it, please complete the following steps:
|
||||
. Click on *Inherit project compile output path*.
|
||||
. Click on *Use module compile output path*.
|
||||
|
||||
== Recommended settings
|
||||
|
||||
=== Code style
|
||||
. Go to *File -> Settings -> Editor -> Code Style*.
|
||||
. Click on *Manage*.
|
||||
. Click on *Import*.
|
||||
. Choose `IntelliJ IDEA Code Style XML`.
|
||||
. Select the file `$(gerrit_source_code)/tools/intellij/Gerrit_Code_Style.xml`.
|
||||
. Make sure that `Google Format (Gerrit)` is chosen as *Scheme*.
|
||||
|
||||
In addition, the EditorConfig settings (which ensure a consistent style between
|
||||
Eclipse, IntelliJ, and other editors) should be applied on top of that. Those
|
||||
settings are in the file `.editorconfig` of the Gerrit source code. IntelliJ
|
||||
will automatically pick up those settings if the EditorConfig plugin is enabled
|
||||
and configured correctly as can be verified by:
|
||||
|
||||
. Go to *File -> Settings -> Plugins*.
|
||||
. Ensure that the EditorConfig plugin is enabled.
|
||||
. Go to *File -> Settings -> Editor -> Code Style*.
|
||||
. Ensure that *Enable EditorConfig support* is checked.
|
||||
|
||||
NOTE: If IntelliJ notifies you later on that the EditorConfig settings override
|
||||
the code style settings, simply confirm that.
|
||||
|
||||
== Run configurations
|
||||
Run configurations can be accessed on the toolbar. To edit them or add new ones,
|
||||
choose *Edit Configurations* on the drop-down list of the run configurations
|
||||
|
||||
Reference in New Issue
Block a user