Child pages
  • Setting up Scala plugin project in IntelliJ IDEA

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Here you can find complete guide how to start writing patches (or to creating your own Scala plugin builds) to IntelliJ IDEA Scala plugin.1.

  1. Checkout project

...

  1. https://github.com/JetBrains/intellij-scala

...

  1. Pull requests is better to do for master branch, which is for IDEA

...

  1. 14.

3. You can use any IDEA version with any installed Scala plugin, just open Scala plugin project in IDEA

4. Now you need to check, that your JDK 1.7 contains required for development JDI library, for Windows or Linux you have to add tools.jar from jdk/lib, for Mac you don't need to add anything

Image Removed

5. Now you need to setup path variables for Scala plugin project. For IDEA 13 it's CARDEA_HOME variable, and LEDA_HOME for IDEA 12 branch: Image Removed

6. Now you can just run/debug IDEA run configuration.

7. To run tests change JUnit defaults according to TypeInferenceTest run configuration (VM options, Working directory, module, before launch settings).

...

  1. Call "sbt downloadIdea" from command line. It's approx. for 10 minutes.
    1. Sometimes you will need to call it again, when dependency to IDEA will be updated.
  2. Import sources as SBT project.
    1. In IntelliJ IDEA 14 choose File -> Import Project...
    2. Choose directory with your scala-plugin repository.
    3. Choose "Import project from external model" -> "SBT". Press Next.
    4. Choose Project SDK. Target SDK is 1.6, however sources are compatible with 1.7. Press Finish.
    5. Wait for the SBT process.
  3. Now you can make project. After that you can run IDEA run configuration.
  4. TypeInferenceTests run configuration is example. You should configure defaults for JUnit according to this example.
  5. You can use ScalaPlugin artifact to build plugin distribution.
  6. You also can compile, test and package plugin from sbt command line.