Play 2.0 using Eclipse 3.6, Scala editing template

I'm new to Play and the Scala world, so I need help finding out how I can edit Scala template files using Eclipse. I already installed Scala ide 2.9, but when I try to edit index.scala.html, the contents of the file are not being edited ...

Please help me?

+6
source share
1 answer

I experienced this recently, but I was lucky that I completely switched from IntelliJ to Eclipse.

There is some tweak needed to create Scala templates, but one of the easiest ways to do this is:

Step 1: add file extensions

http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-51.xhtml

editor preferences

Make sure your file extensions are correctly added to file associations.

Step 2:

Look at the appropriate editor. In the image above, you will see that the only linked editor with *.htm is Web Browser . Therefore, you need to click the "Add ..." button to add the Scala editor. Remember to set it as default :)

Step 3:

right-click context menu for html scala editor

Right-click on the Scala template and make sure you select the correct editor. You can also use this to switch between editors.

Hope this helps!

+12
source

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


All Articles