Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an eclipse plugin for Play2?

I know there is one for play1, but I don't find any for play2.

I hope the plugin can compile the templates to scala code automatically. It's not convenient now.

like image 256
Freewind Avatar asked Feb 15 '12 04:02

Freewind


People also ask

How do I run a play framework in Eclipse?

Generate configuration 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. In the Debug Configurations dialog, right-click on Remote Java Application and select New. Change Port to 9999 and click Apply.

Which IDES can be used for play applications?

Play supports the NetBeans, IntelliJ IDEA and Eclipse platforms.


2 Answers

I just came across Scala IDE Play2 plugin for Eclipse Indigo/Juno and Scala IDE. The current features are

  • Syntax Highlighting (routes and templates)
  • Code completion (templates)
  • Formatter (routes)
  • Hyperlinking (routes and templates)

Note that hyperlinking to Java files is not supported for now. Also there are some limitations for the code completion feature, just take some time to read the doc. I didn't try it myself as I'm not working with Play2 right now, but thought it might be helpful for someone.

like image 50
Baztoune Avatar answered Sep 21 '22 08:09

Baztoune


Edit: This answer is outdated. A Play Eclipse plugin has been written, as @Baztoune says.

There is no Play 2 plugin for Eclipse at the time I’m writing these lines. However, there is an eclipsify sbt command, provided by the Play 2 sbt plugin, which is able to generate an Eclipse project from a Play 2 application.

You won’t get syntax highlighting, contextual completion or code navigation inside Play 2 templates, but you can have them to be automatically compiled when saved by using the ~run sbt command (instead of just run). Check the Eclipse “General −> Workspace −> Refresh using native hooks or polling” option is enabled so it will take compiled templates changes into account.

like image 34
Julien Richard-Foy Avatar answered Sep 19 '22 08:09

Julien Richard-Foy