Setting up Play on Intellij

96 views
Skip to first unread message

Anto Aravinth

unread,
Mar 30, 2017, 11:43:50 AM3/30/17
to Play Framework
Hi All, 

I have few trouble setting up the play project on Intellij. The project is created by issuing the following command:

sbt new playframework/play-java-seed.g8

I had imported the project as an sbt project in Intellij. However, I couldn't able to analyse the controller class fully. For example, the class below:

package controllers;

import play.mvc.*;

/**
 * This controller contains an action to handle HTTP requests
 * to the application's home page.
 */
public class HomeController extends Controller {

    /**
     * An action that renders an HTML page with a welcome message.
     * The configuration in the <code>routes</code> file means that
     * this method will be called when the application receives a
     * <code>GET</code> request with a path of <code>/</code>.
     */
    public Result index() {
        return ok(views.html.index.render());
    }

}

The items in bold, Controller, Result, ok, I can't inspect them. I tried the following:

1. Enabled Play2 compiler for the current project. -- Doesn't help to solve the issue.
2. Right click on the project and add framework support -- Again doesn't help to solve the issue


Can someone kindly let me know how to set up the project properly, so that I could able to inspect all class in Controller and in other source folder?

Thanks. 

Will Sargent

unread,
Mar 30, 2017, 3:59:47 PM3/30/17
to play-fr...@googlegroups.com
You should have the Scala plugin for IntelliJ IDEA.  See the following for more details:


--
Will Sargent
Engineer, Lightbend, Inc.


--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/29417589-78f3-4868-8126-043752dcfc11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anto Aravinth

unread,
Apr 3, 2017, 2:13:58 AM4/3/17
to Play Framework
Hi Will,

Thanks for the reply. But still that didn't work out for me. Not sure, what I'm doing wrong. 
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

Enrico Morelli

unread,
Apr 3, 2017, 3:54:49 AM4/3/17
to Play Framework


On Monday, April 3, 2017 at 8:13:58 AM UTC+2, Anto Aravinth wrote:
Hi Will,

Thanks for the reply. But still that didn't work out for me. Not sure, what I'm doing wrong. 


I've the same problems with new IntelliJ versions. The only version that works fine is 2016.1.4

Anto Aravinth

unread,
Apr 3, 2017, 4:37:35 AM4/3/17
to play-fr...@googlegroups.com
Hi Enrico, 

Oh, thanks for the info. Let me give it a try and let you know if it works. 

--
You received this message because you are subscribed to a topic in the Google Groups "Play Framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/NjBk0RsxQ5g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/4f267508-58f5-44b5-a11a-ef1ee7483e00%40googlegroups.com.

Anto Aravinth

unread,
Apr 3, 2017, 9:21:51 AM4/3/17
to Play Framework
Hi Eric, 

Even the version that you had mentioned doesn't pick up correctly. I ended up adding maven play deps to my project, just for navigating the play sources. Seems to be a hacky way, but for me it solves the problem. 

Adam Lane

unread,
Apr 3, 2017, 4:42:56 PM4/3/17
to Play Framework
+1.  To avoid frustration, I recommend not upgrading intelij to the 2017.1 version until further notice.  The scala plugin doesn't seem to work with play anymore. 

Alexandr Sova

unread,
Apr 3, 2017, 4:46:49 PM4/3/17
to Play Framework
What are you actually doing on each suggestion? Do you just restart IDE? That is not enough.
In worst case as I remember I had to drop all .idea and .iml files and re-import project again.
Plus see are "download sources and docs" boxes checked and are you using correct Scala jar. Bundled didn't worked for me at some highlight cases. Try use that one jar that comes with sbt.


понедельник, 3 апреля 2017 г., 16:21:51 UTC+3 пользователь Anto Aravinth написал:
Hi Eric, 

Even the version that you had mentioned doesn't pick up correctly. I ended up adding maven play deps to my project, just for navigating the play sources. Seems to be a hacky way, but for me it solves the problem. 

On Monday, 3 April 2017 14:07:35 UTC+5:30, Anto Aravinth wrote:
Hi Enrico, 

Oh, thanks for the info. Let me give it a try and let you know if it works. 
On Mon, Apr 3, 2017 at 1:24 PM, Enrico Morelli <enrico....@gmail.com> wrote:


On Monday, April 3, 2017 at 8:13:58 AM UTC+2, Anto Aravinth wrote:
Hi Will,

Thanks for the reply. But still that didn't work out for me. Not sure, what I'm doing wrong. 


I've the same problems with new IntelliJ versions. The only version that works fine is 2016.1.4

--
You received this message because you are subscribed to a topic in the Google Groups "Play Framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/NjBk0RsxQ5g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.

Anto Aravinth

unread,
Apr 3, 2017, 8:58:52 PM4/3/17
to play-fr...@googlegroups.com
Hi,

Yes I do reimported the project after deleting the .idea and other files but nothing works. 

To unsubscribe from this group and all its topics, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/dd8fe60b-168b-47d6-8316-1ea5f4d1ec97%40googlegroups.com.

Anto Aravinth

unread,
Apr 3, 2017, 10:21:01 PM4/3/17
to play-fr...@googlegroups.com
Hi All,

Finally it worked on 2016.3 for me. As others mentioned it doesnt work on 2017 versions. Please update the docs accordingly until the issue is fixed from intellij.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages