Versions Compared

Key

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

See also the tutorial Getting Started with Scala.

...

Wiki Markup
{redirect:https://www.jetbrains.com/idea/help/getting-started-with-play-2-x.html

...

|delay

...

=0}

1. Create play application with project wizard

...

Note

Starting with IntelliJ IDEA 14 EAP build, the Play 2.0 plugin is merged with the Scala plugin.

Open

Project Wizard
span
classshortcut
Wiki Markup
{span:class=shortcut}Project Wizard{span}
, select Play
span
classid
Wiki Markup
{span:class=id}Play 2.x{span}
in Scala
span
classid
Wiki Markup
{span:class=id}Scala{span}
section and click Next
span
classshortcut
Wiki Markup
{span:class=shortcut}Next{span}
.

On the next page of the wizard, specify your project's information and click

Finish
span
classshortcut
Wiki Markup
{span:class=shortcut}Finish{span}
.

The IDE will create an empty application.

...

IntelliJ IDEA lets you import an existing Play project.
Open

Project Wizard
span
classshortcut
Wiki Markup
{span:class=shortcut}Project Wizard{span}
and select Import Project
span
classshortcut
Wiki Markup
{span:class=shortcut}Import Project{span}
.
You can also use main menu and select
span
classshortcut
File
→ Import Project
span
classshortcut
Wiki Markup
{span:class=shortcut}File{span}
→ 
Wiki Markup
{span:class=shortcut}Import Project{span}
.

In the window that opens, select a file that you want to import and click OK.

...

To make sure that project libraries are set up correctly, open

span
classshortcut
File
Project Structure
span
classshortcut
Wiki Markup
{span:class=shortcut}File{span}
Wiki Markup
{span:class=shortcut}Project Structure{span}
and check if module dependencies are resolved without warnings.

...

Since we use Scala for our application, also ensure that

Compiler library
span
classid
Wiki Markup
{span:class=id}Compiler library{span}
is set in Scala facet settings.

...

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

routes
span
classid
Wiki Markup
{span:class=id}routes{span}
files and code inspections.

...