Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Note
iconfalse

This tutorial describes how to get started with Play 1.0 in IntelliJ IDEA. Please download it here before performing this tutorial.

...

Wiki Markup
{redirect:https://www.jetbrains.com/idea/help/play-framework-1-x.html

...

|delay

...

=0}

1. Create application with play command

The easiest way to create a play application is to use

play new
span
classid
Wiki Markup
{span:class=id}play new{span}
command.

Code Block
$ play new myFirstApp

...

Now you can generate IntelliJ IDEA project for the application with

play idea
span
classid
Wiki Markup
{span:class=id}play idea{span}
command. Run the command from the application directory.

Code Block
$ cd myFirstApp
$ play idea

Project file

My first
span
classid
Wiki Markup
{span:class=id}My first application.ipr{span}
and module file My first
span
classid
Wiki Markup
{span:class=id}My first application.iml{span}
generated now.

3. Open project and module settings

Open

My first
span
classid
Wiki Markup
{span:class=id}My first application.ipr{span}
file with IntelliJ IDEA and check module's settings in File → Project Structure
span
classshortcut
Wiki Markup
{span:class=shortcut}File → Project Structure{span}
. You will see that the play libraries are attached to the module.

...

Once libraries attached to the project, Play support is enabled. Now you can open Play Console by

Tools → Play with Playframework
span
classshortcut
Wiki Markup
{span:class=shortcut}Tools → Play with Playframework{span}
. Use Ctrl+ Shift+ Space
span
classshortcut
Wiki Markup
{span:class=shortcut}Ctrl\+ Shift\+ Space{span}
for commands suggestion.

5. Run application

...

In order to debug play application you must create Remote configuration in Run/Debug Configurations by clicking

Run → Edit Configurations
span
classshortcut
Wiki Markup
{span:class=shortcut}Run → Edit Configurations{span}
.