12
votes

I asked this question yesterday, but it was marked as duplicate. So please read my question to the end, don't mark it as duplicate again!

Link to original question.

Original question:

I setup new Play 2.0 Framework project using Intellj IDEA. But I can't find how to run Play!'s command-line utility in Intellij IDEA. From tutorials I learn it must be accessible from Tools | Play with Playframework.

But I missed this context menu:

enter image description here

Where can my problem be?

Some additional info:

  • I setup a new project using Intellij IDEA wizard.
  • I'm able to run the application from Intellij IDEA using the Run command and see the result in the browser.
  • I'm using Intellij Idea 12.1.1
  • To be able to create new project from IDEA I installed all additional plugins (Play 2.0 plugin, Scala plugin)

P.S. An answer to my previous question suggested I Add framework support. But I don't see the Play2.0 facet in the list.

3
up for determination :)biesior
Check the answer to this comment: @Lev, it is supposed that you don’t need it anymore, and the IDE provides what you need (e.g. run, compile, etc). You can use the SBT console instead.CrazyCoder

3 Answers

6
votes

Apparently Play with Playframework was an option available for first release of plugin for Play 1.x (I'm guessing after reading the docs, I have no such option enabled, although I have all required plugins working for Play 2 in Idea 12).

Actually you don't need to use Intelli's kickstarter for creating Play projects anymore, all you need is:

  • Create new project within command line:

    play new
    
  • idealize it with command line too:

    play idea
    
  • Go to Idea, choose File > Open..., find folder with app created in previous steps and... voilà!

4
votes

Play is using SBT console that will be available in the official SBT plugin for IntelliJ IDEA (to be released by the end of April 2013).

Right now you can use the third-party SBT plugin that also provides the console, check this answer for details.

Also, as answered in the blog, it is supposed that you don't need it anymore, and the IDE provides what you need (e.g. run, compile, etc).

1
votes

Indeed, using Play's console in Idea is not obvious.

What you need to do is:

  • In your toolbar, there's a select box (it's written run on yours), click it and choose Edit configurations
  • On the upper left, click the plus (+) sign
  • Choose Play 2 App
  • Configure it as you wish
    You may need to remove make from the Before launch box. Not sure why, but it doesn't let my Play start.
  • Confirm

You can now launch Play's console from that little green launch button, next to the configurations selectbox.

I don't remember needing to run play idea, but do it anyway just in case.