Attaching sources in IntelliJ IDEA for scala project

前端 未结 4 1352
别那么骄傲
别那么骄傲 2021-02-08 01:10

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

I have the code like this:

package models
..
import anorm.SqlPar         


        
4条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 02:03

    First download source code :

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

    2.) Choose any scala version.

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

    enter image description here

    Now point to this Source Code from IntelliJ.

    1.) Open Project Structure in IntelliJ. Shorcut (Cmd + DownArrow)

    2.) Select Global Libraries from the left section.

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

    enter image description here

提交回复
热议问题