IntelliJ Ultimate cannot find routes in Play 2.3 benchmarks (Java)

While my tests are running fine, IntelliJ complains that it cannot find the route object and code autocomplete not working. I went through all the documentation and it should work. This is what IntelliJ reports

error from intellij

Any thoughts on what might be wrong with my project configuration?

+3


source to share


2 answers


This is most likely due to the fact that the route object is created during compilation of the project . Once compiled, it should be placed in a directory target/scala-{ver}/src_managed

. Mark this directory as source and IntelliJ should see the routes correctly.

To do this, you can use one of the following steps:

  • right click the directory in the Project view and select Mark Directory As -> Generated Sources Root



or

  • open File -> Project Structure... -> Modules -> Sources

    and mark the directory src_managed

    as sources using the button above the project structure
+3


source


Actually, your question motivated me to find a solution to this annoying problem :)

And actually it was already said, see this answer that works: fooobar.com/questions/351340 / ...



Also read other answers and comments.

+2


source







All Articles