Trying to link javadoc and sources using IntelliJ 13.1.4 and sbt.

I recently downloaded IntelliJ IDEA 13.1.4 and installed the latest scala plugin, 0.41.1. I wanted to know if there's a way to link in javadoc and srcs using the sbt mechanism.

This is my top level build.sbt file:

name := "scalasandpit"

version := "1.0"

scalaVersion := "2.10.2"

libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.1.0" % "test"

Attached is a view into my project structure.

I want to be able to do quick references to scala types and such using ^j and navigate to sources. I can't find a way to make this work using SBT & IntelliJ

Screen Shot 2014-08-23 at 7.46.28 pm.png
Comment actions Permalink

Hi James,

IDEA can download and attach all the required sources and javadocs automatically, you simply need to enable "Download sources and docs" checkbox in the Import (Open) Project wizard.

Alternatively, if you have an existing imported project, you may turn on the same checkbox in the Project Settings / SBT tab, and then press Refresh button in the SBT tool window.

All the sources and docs should be visible via the Project Structure dialog and all the info/navigation actions should be available.

Comment actions Permalink

Thanks for the response Pavel. When I open my existing SBT project, then File -> Other Settings -> Default Settings. Under the SBT selection I see this.

Screen Shot 2014-08-25 at 11.36.43 pm.png

There doesn't seem to be any option to select download sources.

Also, when I use the new project wizard, I don't see any options either when I choose the SBT project type I don't see an option, here's what i see:

File -> New Project -> Scala -> SBT

Screen Shot 2014-08-25 at 11.37.51 pm.png

Screen Shot 2014-08-25 at 11.38.23 pm.png

Bear in mind, I've started with a clean download of IntelliJ. I installed the latest Scala plugin about a week ago.

Any hints much appreciated.


Comment actions Permalink

I was able to import a clean standalone SBT project and select the "download sources and docs" appropriately though.


Please sign in to leave a comment.