-
Notifications
You must be signed in to change notification settings - Fork 0
Working with Play is easy. You don’t even need a sophisticated IDE as Play compiles and refreshes the modifications you make to your source files automatically. So you can easily work using a simple text editor.
However, using a modern Java or Scala IDE provides cool productivity features like auto-completion, on-the-fly compilation, assisted refactoring and debugging.
Play provides a command to simplify Eclipse configuration. To transform a Play application into a working Eclipse project, use the eclipsify command:
[My first application] $ eclipsify
You then need to import the application into your Workspace with the File/Import/General/Existing project… menu.

You can use the Connect JPDA launcher using Debug As to start a debugging session at any time. Stopping the debugging session will not stop the server.
If you make any important changes to your application, such as changing the classpath, use eclipsify again to regenerate the configuration files.
Do not commit Eclipse configuration files when you work in a team!
The generated configuration files contain absolute references to your framework installation. These are specific to your own installation. When you work in a team, each developer must keep his Eclipse configuration files private.
The application skeleton generated by play does not come pre-enabled with intellij support. Adding intellij support can be done in project/plugins.sbt. Add the sbt-idea plugin to the resolver by changing the template to the following:
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.0.0")
The additions here is the "sbt-idea-repo" to the resolvers list, and the sbt-idea plugin itself in the addSbtPlugin declaration.
To generate an idea project skeleton, ensure that intellij is not open, and execute the gen-idea command in the play console:
$ play
[My first application] $ gen-idea
This will download any libraries or sources that are necessary, and then build the project files. The project can then be opened by clicking File -> Open project in IntelliJ.
Next:
Explore the sample applications
Read the Play 2.0 manual: