How to get Scala imports working in IntelliJ IDEA with the Play framework?
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.
精彩评论