Reputation: 623
I am trying to get play framework to work properly in IntelliJ but it seems like my Scala templates aren´t detected properly. These are the steps I have done:
Setup:
From Terminal i run this (in the following order):
In IntelliJ I open the project and check the file target/scala-2.10/src_managed/main/controllers/routes and it looks like this:
I have also tried following these instructions step by step to set up a completely fresh installation:
How to use intellij with play framework
And after completing all steps, IntelliJ is still unable to resolve the Scala templates. This is from a completely fresh play application:
I can compile, run tests from the IDE and watch changes I have made in the browser. The only thing that isn´t working is the code assistance within IntelliJ. I have no idea how to proceed at this point, any help is greatly appreciated!
Upvotes: 6
Views: 2996
Reputation: 623
So I finally managed to figure it out. It seems like IntelliJ picks up on the compiled Scala templates. Right-clicking on the target folder, and select "Mark Directory As" --> "Excluded" fixed the problem for me.
Upvotes: 5
Reputation: 533
IntelliJ doesn't use the routes file as a source file. It is aware of the routes, though, so if you do something like routes.Application, it will be able to resolve that.
Upvotes: 0