IntelliJ IDE does not detect Scala templates correctly

I am trying to get the working environment to work correctly in IntelliJ, but it seems that my Scala patterns are not detected properly. These are the steps I took:

Setup:

  • Brew install the game
  • Brew install sbt
  • Download and install the play Framework plugin for IntelliJ
  • Download and install the Scala plugin for IntelliJ
  • Download and install the SBT plugin for IntelliJ

From the terminal, I run this (in the following order):

  • play the new doTest
  • play clean compile
  • reproduction idea
  • SBT
  • generator idea

In IntelliJ, I open a project and check the target / scala -2.10 / src_managed / main / controllers / routes file and look like this: http://i.imgur.com/EN4iqux.png

I also tried following the steps step by step to set up a completely new installation:

How to use intellij with a playlist

And after completing all the steps, IntelliJ still cannot resolve the Scala templates. This is from a brand new game: http://i.imgur.com/IPrUpVL.png

I can compile, run tests from the IDE and see the changes I made in the browser. The only thing that doesn't work is help in IntelliJ code. I have no idea how to act at this moment, any help is greatly appreciated!

+6
source share
2 answers

So, I finally managed to figure it out. It seems like IntelliJ is picking compiled Scala templates. Right-click on the target folder and select "Mark Directory As" → "Excluded", fixing the problem for me.

+5
source

IntelliJ does not use the routes file as the source file. However, he knows the routes, so if you do something like routes. Application, it can solve it.

0
source

Source: https://habr.com/ru/post/957284/


All Articles