4 | | 2. Run ant in the source directory to obtain a `josm-custom.jar` → [[DevelopersGuide/Compiling#CompilingusingAnt]] |
5 | | 3. In IntelliJ: File → New → Project from Existing Sources |
6 | | 4. … |
| 4 | 1. Run ant in the source directory to obtain a `josm-custom.jar` → [[DevelopersGuide/Compiling#CompilingusingAnt]] |
| 5 | 1. In IntelliJ: File → New → Project from Existing Sources |
| 6 | 1. Navigate to the JOSM source code [[BR]] [[Image(intellij-from-sources-01.png)]] |
| 7 | 1. [[Image(intellij-from-sources-02.png)]] |
| 8 | 1. [[Image(intellij-from-sources-03.png)]] |
| 9 | 1. [[Image(intellij-from-sources-04.png)]] |
| 10 | 1. [[Image(intellij-from-sources-05.png)]] |
| 11 | 1. File → Project Structure |
| 12 | * Modules → Sources: Exclude the directory `src/org/apache` [[BR]] [[Image(intellij-exclude-apache.png)]] |
| 13 | * Modules → Dependencies: Make sure that `josm-custom` (i.e., the file generated by Ant is listed) |
| 14 | * Modules → Dependencies: Add Groovy (you might need to configure that at "Global Libraries") [[BR]] [[Image(intellij-add-groovy.png)]] |
| 15 | 1. Run → Edit Configuration |
| 16 | * Add an "Application" configuration [[BR]] [[Image(intellij-run-configuration.png)]] |
| 17 | |
| 18 | Whenever presets, images, styles, or parser definitions change, re-run Ant in order to have those modifications included in `josm-custom.jar`. |
| 19 | |
| 20 | This is a bit hackish, but works nicely. ☻ |