1

I've been trying to import a Play2 project in IntelliJ IDEA 13. It seemed to have imported just fine until I tried navigating around the code and realized that the routes file points to the controller.Application present in play jar bundled with sbt instead of my file.

I've tried all possible combinations that I could think of:

  • Import the checked-out project using IntelliJ IDEA and let it auto-import and resolve dependencies
  • Import using play console and then simply opening it in IntelliJ IDEA

However this is not an issue when I create a new play project and the routes file happily points to the right controller.Application.

UPDATE:

My folder structure is like this: enter image description here

I tried pulling controllers folder up one level & intellij stopped complaining but I get the error when I view it in browser.

It seems that I'm not configuring it right. I'd really appreciate any help on this. Thanks.

mindreader
  • 1,763
  • 1
  • 20
  • 35

2 Answers2

0

Have you tried running "play idea" in the project directory to refresh the IDEA project file?

Shanness
  • 365
  • 2
  • 10
0

This issue was resolved by setting sources appropriately. Here's how I did it:

  • Press Ctrl+Shift+S to open the project properties
  • Modules > your module > sources (tab)
  • Select the following as sources
    • app
    • conf
    • target/scala-2.10/classes_managed
    • target/scala-2.10/src_managed
    • target/scala-2.10/src_managed/main
mindreader
  • 1,763
  • 1
  • 20
  • 35