开发者

How to get Scala imports working in IntelliJ IDEA with the Play framework?

开发者 https://www.devze.com 2023-03-14 00:44 出处:网络
I\'m using the Scala plugin for IDEA and normally, it works (almost) perfectly. However, it seems to have problem with the import stat开发者_开发问答ements for the Play framework: I often get the err

I'm using the Scala plugin for IDEA and normally, it works (almost) perfectly.

However, it seems to have problem with the import stat开发者_开发问答ements for the Play framework: I often get the error "Cannot resolve symbol x". Now that doesn't stop the program from working, but it makes autocompletion completely useless.

Example: import org.scalatest.junit._

I already added /opt/play/framework/src and /opt/play/framework/play-1.2.2RC2.jar to classes and sources of my project. (using "Project Structure")

Any ideas on how to solve this? Or is this simply a bug?

(I am using Scala 2.9.0.1, IDEA 10.5 and Scala Plugin 0.4.1084)


Try to add tmp/generated to your sources as well. Eclipse also has this issue, since the Play Framework generate the source files from the templates. See Errors in Eclipse for Scala project generated by Play Framework.

0

精彩评论

暂无评论...
验证码 换一张
取 消