IntelliJ 11 cannot resolve Play/Scala models without using root package in import statements
-
12-12-2019 - |
Question
I just started working on a project using IntelliJ with Play and Scala plugins that was previously developed in Scala IDE. The project compiles and runs fine, but the IDE is showing a bunch of validation errors throughout controllers because the model symbols cannot be resolved.
Suppose I have a model called User and my controller has import statement:
import models.User
IntelliJ does not resolve the symbol for User model. When I try to auto fix the error using "import models.User" action, the IDE creates a second import statement:
import _root_.models.Workspace
I understand that the root package is used within Scala for absolute package locations, but obviously it is not required in this case and I want the IDE to work properly with the first import statement.
Is there any setting I can change within the IDE or within Play/Scala config to allow the first import statement to work properly? Thanks!
Solution
Looks like a known bug, please star/vote to track the progress.