在IntelliJ IDEA中为scala项目附加源代码 [英] Attaching sources in IntelliJ IDEA for scala project
问题描述
我有Scala的Playframework 2项目(非常小)。它使用 Scala Anorm 库。
I have Playframework 2 project with Scala (very small one). It uses Scala Anorm library.
我有像这样的代码:
package models
..
import anorm.SqlParser._
...
val rowParser = scalar[Long]
所以,我想看看标量方法的来源。试图附上我在plaframework源文件夹中的源代码,但是IDEA只是吞下了我的请求并且什么也没做。
So, I would like to see source of scalar method. Trying to attache the sources I have in my plaframework source folder, but IDEA just swallows my request and does nothing back.
我使用的是最新版本的IDEA和Scala插件。这可能是错误吗?
I use last version of IDEA and Scala plugin. Is it bug, probably?
推荐答案
Aha ..修复。
Aha.. fixed.
所以:我以前在窗口编辑器的顶部使用'attach source' - 它不起作用(我想这是一个bug - 可能与scala有关插件,因为通常它的工作原理)。
So: I used to use 'attach source' in the top of the window editor - it does not work (I guess it is a bug - maybe related to the scala plugin, because usually it works).
但是如果尝试将源附加到特定库 - 在项目结构 - >库 - > +附加文件或目录 - >源中则可行。
But if try to attache sources to particular library - in "Project Structure -> Library -> +Attach File or Directories -> Sources" then it works.
谢谢。
这篇关于在IntelliJ IDEA中为scala项目附加源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!