Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA reports errors in routes

  1. I've created a project by activator new play-scala-intro play-scala-intro
  2. In IDEA I've clicked File -> Import project from Existing sources and selected SBT.

enter image description here

This is default project structure: dfdfdf

I've also tried all tips from here (suggested for for Play 2.2 — 2.3, whereas I have Play 2.4). But I haven't tried to add target/scala-*/classes_managed to sources because my project doesn't contain this folder.

Versions

  • I have Idea 14 Ultimate with installed "Scala" and "Playframework support" plugins.
  • Play Framework: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.1")
  • scalaVersion := "2.11.6"
like image 237
Nelson Tatius Avatar asked Feb 09 '23 17:02

Nelson Tatius


1 Answers

JetBrains hasn't yet updated their Scala/Play plugin to reflect the new routing structure with Play 2.4 (using classes instead of objects for the controllers, for example). You can ignore those errors, run the app and it'll be all fine.

See the ongoing issue ticket over on https://youtrack.jetbrains.com/issue/SCL-8812 for more. One comment says: "This got fixed in the recent EAP Build of IntelliJ and Scala 1.6.27.1.EAP also IntelliJ EAP 15 looks really good in his current state."

You can wait for IntelliJ 15. In the meanwhile, ignore the errors which are wrongly flagged by IntelliJ 14 and older versions.

like image 182
bjfletcher Avatar answered Feb 12 '23 07:02

bjfletcher