Skip to content

Commit a8e9428

Browse files
committed
Cumulative updates
1 parent 3e0ba7b commit a8e9428

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,15 @@ options are viable.
1616

1717
### IntelliJ IDEA
1818

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.
2627

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-
3428
#### IntelliJ Scala bugs
3529

3630
**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
143137
by IDE reformatting we use [scalafmt](http://scalameta.org/scalafmt/).
144138

145139
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".
147140

148141
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.)
151143

152144
## Authors
153145

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)