3

I want to setup IntelliJ IDEA as my IDE for a Play2 application. According to the documentation there should be an idea command that comes with the play framework. See here http://www.playframework.org/documentation/2.0.3/IDE. I just downloaded, unzipped and setup the play framework and even created a new application but the idea command seems to be missing.

Where is this command? If it's not going to be available then I could use some tips on setting up the environment manually.

I already tried Creating an new project and importing the sources but IntelliJ did not detect any frameworks.

4

4 回答 4

11

Maybe you forgot to switch to the application folder.

not working:

$ play new my-app 
$ play idea

output:

play! 2.0.3, http://www.playframework.org
This is not a play application!

correct:

$ play new my-app
$ cd my-app
$ play idea

If that does not work, please show what you have typed and what is the output.

IntelliJ IDEA 11 has no native support for play 2.

于 2012-10-01T04:59:44.017 回答
4

I follow the steps

  1. play new myproject
  2. cd myproject
  3. play idea

And then following the intellij documentation I tried to import the play module, didnt work

But checking the Play wiki I realize that instead of importing the module into an existing project of iltellij I must open the project and everithing is already in place.

于 2012-11-08T10:12:19.380 回答
1

For Play 2.0, I ran into issues with the vanilla play idea command. Most, if not all associated libraries were malformed in the .iml file.

As a workaround, I used play eclipsify and used Idea's 'Import from External Source' to create a proper idea project with all the dependencies. Worked like a charm.

于 2012-10-03T00:06:11.220 回答
1

You can also try using:

play idea with-sources=yes

Works for me.

于 2013-10-08T19:28:08.593 回答