How to create a Play project in IntelliJ IDEA 14 Community Edition?
Asked Answered
L

2

5

I am trying to create a Scala project in IntelliJ IDEA 14. As mentioned in IntelliJ IDEA's help, the Scala plugin already has support for Play 2.x.

I have installed the Scala plugin, and when I create a new project I can select Scala > Scala and Scala > SBT projects but there's no Scala > Play 2.x.

Are there any additional steps needed to make this available? I am using IDEA 14 Community Edition.

I have tried importing module to a Scala project using play-generated .impl file but IDE could not handle it well e.g. was finding errors in completely fine play! views.

Lotuseater answered 3/12, 2014 at 14:18 Comment(0)
C
9

Play framework is supported only in ultimate edition of Intellij Idea.

Here https://www.jetbrains.com/idea/features/editions_comparison_matrix.html, section Frameworks and Technologies.

Cuspidate answered 3/12, 2014 at 14:30 Comment(4)
Creating and running a Play2.x project with the Activator and remote debugging with Idea should work though, right?Campbell
If you somehow get your source code into Idea then yes, it should work. The problem is opening the sources of the play project in Idea without the plugin.Unequivocal
Getting the source code into Idea was no problem. The Typesafe Activator creates the Idea Project for you. I only had trouble with remote debugging. Idea had trouble finding the source code of my project with the breakpoints when using the activator ui. Running activator and play from the console works however...Campbell
I was wondering what went wrong with my setup in Community. What a letdown :( Can't say there's anything wrong with using the console though. Especially that my tests seem to fail when run from IntelliJ for some reason.Tunicle
D
3

For everyone else looking for an answer for Play 2.4+ the easiest way to get up and running is:

  1. Create a new Run Configuration – From the main menu, select Run -> Edit Configurations
  2. Click on the + to add a new configuration
  3. From the list of configurations, choose “SBT Task”
  4. In the “tasks” input box, simply put “run”
  5. Apply changes and select OK.

Now you can choose “Run” from the main Run menu and run your application

https://www.playframework.com/documentation/2.4.x/IDE

Doll answered 8/8, 2015 at 22:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.