I have an imported sbt project. During import I did NOT click on download sbt sources - and I am unclear as to whether that were the cause of the subsequent issue. In any case is there a way to remedy the missing library as shown in the screenshot?
Clicking on "Download" results in the "Library sources aren't found" as seen above.
Update From an answer below: Going to Other settings|default settings|Build, Execution, Deployment|build tools|SBT Here is what I see:
Another update I went to the Intellij Idea|Preferences|Execution,Deployment,Build and see the following
Note: even after checking Download sbt docs and sources it does not "take": it remains unchecked the next time the dialog is brought up.
To install Scala plugin, press Ctrl+Alt+S , open the Plugins page, browse repositories to locate the Scala plugin, click Install and restart IntelliJ IDEA. Now you can successfully check out from VCS, create, or import Scala projects.
In the Project tool window, right-click a Scala library class that you want to decompile. From the context menu, select Decompile Scala to Java. IntelliJ IDEA converts code to Java and opens the converted file in the editor. You can also open the library class in the editor and use its context menu for the conversion.
File
-> Settings
-> Build, Execution, Deployment
-> Build Tools
-> SBT
, check the "Download sources and Docs". open the SBT panel, and click refresh. Voila.
I'm constantly fighting Intellij on Windows (across different versions and updates... mostly EAP, so it's probably my fault), but if I add withSources() withJavadoc()
to the end of a library dependency:
libraryDependencies ++= Seq(
"com.twitter" %% "finatra-http" % versions.finatra withSources() withJavadoc(),
it will download the source and docs. Then when I click Attach Sources...
if I point to that in my cache, Intellij will finally update and load the sources correctly.
See http://www.scala-sbt.org/0.13/docs/Library-Management.html#Download+Sources for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With