Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play 2.0 with Eclipse 3.6, Scala template editing

I´m new to Play and Scala world, so I´m needing some help to figure out how can I edit the scala template files using Eclipse. I already installed scala ide 2.9 but when I try to edit the index.scala.html, the contents of the file aren´t editable...

Please can anyone help me?

like image 578
Marcelo Avatar asked Mar 14 '12 13:03

Marcelo


1 Answers

I experienced this just recently, too, but lucky for you I made the full migration from IntelliJ to Eclipse.

There is some setting up you need to do with the Scala templates, but one of the easiest ways to get it done is following these steps:

Step 1: Add file extensions

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

editor preferences

Be sure that your file extensions are properly added to the file associations.

Step 2:

Look at the associated editor. In the image above you'll see that the only associated editor with *.htm is Web Browser. So you'll need to hit the "Add..." button to add the Scala editor. Don't forget to set it as default :)

Step 3:

right-click context menu for html scala editor

Right-click on your Scala template and be sure that you are choosing the right editor. You can also use this to switch between editors.

Hope this helps!

like image 182
crockpotveggies Avatar answered Oct 31 '22 18:10

crockpotveggies