See also the tutorial Getting Started with Scala. |
{redirect:https://www.jetbrains.com/idea/help/getting-started-with-play-2-x.html|delay=0} |
Before you create a project make sure that Scala and Play Framework version 2.0 plugins are enabled in IntelliJ IDEA.
Starting with IntelliJ IDEA 14 EAP build, the Play 2.0 plugin is merged with the Scala plugin. |
Open
{span:class=shortcut}Project Wizard{span} |
{span:class=id}Play 2.x{span} |
{span:class=id}Scala{span} |
{span:class=shortcut}Next{span} |
On the next page of the wizard, specify your project's information and click
{span:class=shortcut}Finish{span} |
The IDE will create an empty application.
IntelliJ IDEA lets you import an existing Play project.
Open
{span:class=shortcut}Project Wizard{span} |
{span:class=shortcut}Import Project{span} |
{span:class=shortcut}File{span} |
{span:class=shortcut}Import Project{span} |
In the window that opens, select a file that you want to import and click OK.
On the first page of the wizard, select Import project from external model option, choose SBT project from the list and click Next.
On the next page of the wizard, you can select the following options:
Click Finish.
To make sure that project libraries are set up correctly, open
{span:class=shortcut}File{span} |
{span:class=shortcut}Project Structure{span} |
Since we use Scala for our application, also ensure that
{span:class=id}Compiler library{span} |
When everything is set up, you can use code completion, navigation and on-the-fly code analysis features in your Play files. IntelliJ IDEA also supports code assistance for
{span:class=id}routes{span} |
You can run Play application and check the output in your default browser.
You can easily start a debugger session. You can use default configurations' settings and simply click OK.
See also the tutorial Getting Started with Scala. |