You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-17Lines changed: 9 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,21 +16,15 @@ options are viable.
16
16
17
17
### IntelliJ IDEA
18
18
19
-
- Install the Scala and the SBT plugins in IntelliJ.
20
-
- Clone this repository (File -> New -> Project from Version Control -> GitHub).
21
-
Choose the directory name `tip`. (**If you use another directory name, then the next step may fail!**)
22
-
- IntelliJ should then detect an SBT project. Click 'Import SBT project' and follow the instructions.
23
-
(If this is your first Scala project, you will need to setup the Scala SDK.)
24
-
- Right-click on `Tip.scala` in `src/tip`, then select "Run 'Tip'". To supply
25
-
arguments, use Run... -> Edit Configurations in the Run menu.
19
+
- Install the Scala plugin in IntelliJ. (Follow the instructions on [how to install IntelliJ plugins](https://www.jetbrains.com/help/idea/installing-updating-and-uninstalling-repository-plugins.html), search for "Scala" in the plugins menu.)
20
+
- Open a terminal, navigate to the directory where you want to store the TIP project.
21
+
- Run `git clone https://github.com/cs-au-dk/TIP.git tip`
22
+
- In IntelliJ, click File -> New -> Project from Existing Sources..., choose your new 'tip' directory, click OK, choose 'Import project from external model', then 'sbt' and 'Next'.
23
+
- Select a 'Project JDK' (1.8 or newer), and make sure 'builds' is enabled under 'sbt shell", 'use for' before clicking 'Finish'.
24
+
- In the IntelliJ Project overview, move the contents of 'ideafiles' into '.idea', overwriting the existing files.
25
+
- Now reload the project by clicking File -> Invalidate Caches / Restart... -> Just Restart. (Yes, this step is necessary, because of a bug in IntelliJ.)
26
+
- Right-click on `Tip.scala` in `src/tip`, then select "Run 'Tip'". To supply arguments, use Run... -> Edit Configurations in the Run menu.
26
27
27
-
If you clone the repository using git instead of IntelliJ, you will need to import the project from the SBT model
28
-
(File -> New -> Project from Existing Sources).
29
-
Since the `.idea` folder is then regenerated from scrach, in order to keep the
30
-
inspection profiles you need to checkout the `.idea/inspectionProfiles`
31
-
folder and the `.idea/codeStyles` folder from the original repo,
32
-
leaving the other generated folders untouched.
33
-
34
28
#### IntelliJ Scala bugs
35
29
36
30
**Important: if you experience spurious type errors reported by IntelliJ for code involving Scala implicits, try disabling type-aware highlighting**
@@ -143,11 +137,9 @@ To avoid using inconsistent code styles and meaningless diffs caused
143
137
by IDE reformatting we use [scalafmt](http://scalameta.org/scalafmt/).
144
138
145
139
The code is automatically formatted upon compilation by SBT.
146
-
In IntelliJ you need to ensure that SBT is used for compiling: in File -> Settings... -> Build Tools -> SBT, check the option "Use SBT shell for build and import".
147
140
148
141
Before committing, please double-check that all the code is in the right format by executing `sbt scalafmt`.
149
-
By installing the scalafmt IntelliJ plugin and enabling the "Format on save" option as explained
150
-
[here](https://olafurpg.github.io/scalafmt/#IntelliJ) the code is automatically formatted when the file is saved (unfortunately the formatting is only triggered when the file is *explicitly* saved with Ctrl-S).
142
+
To automatically format when the file is saved, go to File -> Settings..., under 'Editor', 'Code Style', 'Scala', make sure 'Scalafmt' is selected under 'Formatter'. (Unfortunately the formatting is only triggered when the file is *explicitly* saved with Ctrl-S.)
0 commit comments