Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get IntelliJ to recognize Play Framework *.scala.xml Templates

Has anyone gotten IntelliJ IDEA to recognize *.scala.xml twirl templates? HTML templates seem to get picked up by the IDE just fine and seem to be the only supported template out of box, but any other type of templates do not get picked up.

like image 947
shinjw Avatar asked Nov 25 '15 01:11

shinjw


People also ask

What is play framework in Scala?

Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.

How do I import a play framework project into Eclipse?

You then need to import the application into your Workspace with the File/Import/General/Existing project… menu (compile your project first). To debug, start your application with sbt -jvm-debug 9999 run and in Eclipse right-click on the project and select Debug As, Debug Configurations.


1 Answers

I had the same problem and it seems that adding a file association did the trick.

In Intellij IDEA 15 (ultimate edition):

Preferences > Editor > File Types Search "Play 2" and add "*.scala.xml" (expect a long indexing after that)

File Types with *.scala.html added

like image 150
archz Avatar answered Sep 24 '22 23:09

archz