Attaching sources in IntelliJ IDEA for the scala project

I have a Playframework 2 project with Scala (very small). It uses the Scala Anorm library.

I have a code like this:

package models .. import anorm.SqlParser._ ... val rowParser = scalar[Long] 

So, I would like to see the source of the scalar method. Trying to connect the sources that I have in my source lampshades folder, but IDEA just swallows my request and does nothing.

I am using the latest version of the IDEA and Scala module. This is probably a mistake?

+7
source share
4 answers

Yeah .. fixed.

So: I used the "attach source" at the top of the window editor - it doesn’t work (I think this is an error - possibly related to the scala plugin, because it usually works).

But if you are trying to connect sources to a specific library - in "Project Structure β†’ Library β†’ + Attach File or Directories β†’ Sources", then it works.

Thanks.

+7
source

First download source code:

1.) Click on this link: http://www.scala-lang.org/download/all.html

2.) Select any version of scala.

3.) Now in the last section "Other Resources" you can see the link "Sources". Click on it to download. In my case ( https://codeload.github.com/scala/scala/tar.gz/v2.11.7 )

enter image description here

Now specify this source code from IntelliJ.

1.) Open the project structure in IntelliJ. Shorcut (Cmd + DownArrow)

2.) Select "Global Libraries" on the left.

3.) Then on the right side in the "Scala Library" section. Click "+" and point to the source directory. See screenshot.

enter image description here

+5
source

To fix this, we need to make some changes to the IntelliJ IDEA platform. This will most likely be fixed in IntelliJ IDEA 13.1.

+2
source

I have the same problem. I installed "Scala Imports Organizer" and the problem was resolved.

+1
source

All Articles