Search code examples
javaeclipseplayframeworkeditortwirl

Editing Play 2.8 Twirl templates in Eclipse


The same question was asked 3 years ago. However, the answer from that time is no longer valid.

I have the last stable version of Debian and the last version of Eclipse (2020-03) running on it. I have a Java Play 2.8 project which sbt compiles and runs just fine. I am able to edit all source files (.java code and .scala.html templates) in Eclipse. However, template files in the Eclipse editor look like ordinary text opened in Notepad: no syntax highlighting, no syntax checking. Editing cmplicated template files without any help from the IDE is very painful.

In the past I was able to download Scala IDE plugin with Play support from Scala IDE project. However, Scala plugin for Eclipse seems to be gone (it's not being developed any more). My tries to install the last version of the plugin have failed.

What is the right way to edit Play templates in Eclipse right now? I need at least syntax highlighting, syntax checking is not critical.


Solution

  • i use eclipse on Linux mint cinnamon, the same version as yours. in the eclipse marketplace, i can see a plugin is available which can be used for this purpose, in eclipse, Help->Eclipse Marketplace and then search for Scala IDE 4.7.x and install it.

    enter image description here

    marketplace description

    hopefully this will work.