1 # HAT Code Formatting in IntelliJ
2
3 ----
4
5 * [Contents](hat-00.md)
6 * Build Babylon and HAT
7 * [Quick Install](hat-01-quick-install.md)
8 * [Building Babylon with jtreg](hat-01-02-building-babylon.md)
9 * [Building HAT with jtreg](hat-01-03-building-hat.md)
10 * [Enabling the NVIDIA CUDA Backend](hat-01-05-building-hat-for-cuda.md)
11 * [Testing Framework](hat-02-testing-framework.md)
12 * [Running Examples](hat-03-examples.md)
13 * [HAT Programming Model](hat-03-programming-model.md)
14 * Interface Mapping
15 * [Interface Mapping Overview](hat-04-01-interface-mapping.md)
16 * [Cascade Interface Mapping](hat-04-02-cascade-interface-mapping.md)
17 * Development
18 * [Project Layout](hat-01-01-project-layout.md)
19 * [IntelliJ Code Formatter](hat-development.md)
20 * Implementation Details
21 * [Walkthrough Of Accelerator.compute()](hat-accelerator-compute.md)
22 * [How we minimize buffer transfers](hat-minimizing-buffer-transfers.md)
23 * [Running HAT with Docker on NVIDIA GPUs](hat-07-docker-build-nvidia.md)
24
25 ---
26
27 ## How to configure it?
28
29 In IntelliJ:
30
31 1. Import XML for auto-formatter rules: Settings -> Editor -> Code Style ->
32 Java -> Scheme (gear) -> Import Scheme -> IntelliJ IDEA code style XML
33 2. Select file from `hat/scripts/IDEA-xml-formatter/HAT-Formatter.xml`.
34 3. Enable Actions on Save: Settings -> Tools -> Actions on Save -> Enable
35 `Reformat Code`
36 4. Enable Optimize Imports: Settings -> Tools -> Actions on Save -> Enable
37 `Optimize Imports`.