Skip to content
MathieuMonney edited this page Apr 15, 2015 · 7 revisions

1. Clone the repository

git clone [email protected]:SidneyBovet/smargn.git

2. Download IntelliJ

You can find it there: https://www.jetbrains.com/idea/download/

3. Install Scala, SBT and Save Actions plugins for IntelliJ

Start IntelliJ (don't import the project yet). Go to File -> Settings (for OSX: IntelliJ IDEA -> Preferences) and then click on Plugins in the new window. Click on "Browse repositories..." and install Scala, SBT and Save Actions plugins.

4. Import the project

Restart IntelliJ. Now you can import the project as an SBT project.

5. Import the codestyle formatter rules

Go to File -> Import Settings and select codestyle_formatter.jar. Click Ok twice, IntelliJ will restart. Once it has restarted, go to File -> Settings (for OSX: IntelliJ IDEA -> Preferences), then Editor -> Code style -> Scala. Next to "Manage" select "ScalaCodeStyle". Apply the changes before going to next step.

6. Check that Save Actions plugin is correctly setup

Go to File -> Settings (for OSX: IntelliJ IDEA -> Preferences) and in the new window Other Settings -> Save Actions. If it is activated you don-t have to do anything else, otherwise activate the plugin and check the box "Reformat code" (and only this one, organize import seems to be a bit buggy somehow and rearrange code triggers and exception and doesn't format nor save). Now whenever you save the files will be formatted.

Troubleshoot:

  • If you have an error that looks like "InitializerSomethingSomethingError", then run the command "activator clean run".
  • If you want to install a plugin after IntelliJ's installation, then go to File-> Settings -> Browse repositories -> look up for Save Actions -> Install Plugin -> Restart IntelliJ