scala - Intellij IDEA don't recognize Play 2.0 features -
i checked out project github, run sbt gen-idea
, opened project in idea. 1 of project modules uses play 2.0 framework.
but idea don't recognize symbols specific play!. i.e. following error: cannot resolve symbol index
in following statement views.html.index
.
same errors on other specific play! framework features, example same error on routes
variable.
p.s. have installed play 2.0
, scala
, sbt
plugins , configured play 2.0 framework root directory (in project settings - play configuration
)
personally, don't use play addon intellij. it's far quicker , reliable use command-line in order compile/generate different elements including famous *.template.scala
, @ origin of cannot resolve symbol index
notification.
all have run command-line based on app's root folder: play
compile
. of course, not rebuild project
intellij, otherwize you'd erase generated class files command-line. when dealing non-managed resources (like templates), make cmd+f9
compile.
making sure output compilation intellij configured map same folder app's target
folder (what sbt gen-idea
(although use play
then idea with-sources=yes
) auto-configures).
then intellij project not complain more views.html.index
unresolved.
of course, if want benefit intellij ide, make sure have installed last play 2.x plugin.
alternatively, create custom run
command in intellij in order take in account sbt compilation.
Comments
Post a Comment