Skip to content

IDE Plugins

Jan Polák edited this page Oct 12, 2015 · 5 revisions

In most cases you will be able to open and edit each sub-project (like common, android or desktop), but you still need to use SBT to build the project.

Eclipse

Add following line to your project/plugins.sbt file:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")

Make sure you have Eclipse and the latest ScalaIDE plugin, then type:

$ sbt eclipse

IntelliJ IDEA

NOTE: Latest versions of IntelliJ (>=14, with Scala plugin) will import SBT projects automatically, without any SBT plugins needed. If you are on older versions, read on.

Add following line to your project/plugins.sbt file:

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0") 

Make sure you have Intellij Idea and the latest Scala plugin, then type:

$ sbt "project core" gen-idea

You can now open the project, then create an "Android Application" build config using the android module and an "Application" build config using the desktop module.

If you get an error saying java.lang.NoClassDefFoundError: android/Keys$ProjectLayout, try upgrading the sbt-idea plugin to 1.7.0-SNAPSHOT in project/plugins.sbt:

resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")

Alternatively you can try downgrading sbt-idea to 1.5.1 or downgrading android-sdk-plugin to 1.3.1.

Netbeans

Add following line to your project/plugins.sbt file:

addSbtPlugin("org.netbeans.nbsbt" % "nbsbt-plugin" % "1.1.2")

Make sure you have Netbeans and the latest NBScala plugin, then type:

$ sbt netbeans

Emacs/Sublime Text

Add following line to your project/plugins.sbt file:

addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.5-SNAPSHOT")

Make sure you have EMACS 22 or Sublime Text Editor 2 with Sublime-ENSIME integration and the latest ENSIME plugin (0.9+), then type:

$ sbt "ensime generate"
Clone this wiki locally
You can’t perform that action at this time.