Yaroslav
Yaroslav

Reputation: 4669

How to make IntelliJ IDEA keep package prefixes for source folders after reimport?

For some projects the standard directory layout module/src/main/scala/com/company/project/module may be an overkill and can be flattened to module/src. I work with the scala language which doesn't force packages to be equal to file paths. IDEA will be unhappy, complain that a package doesn't correspond to a file path, create new classes with wrong packages and so on. To fix that I can specify package prefix for source folders and then it will work fine. However those prefixes are lost on project reimport (from SBT). Can I make IDEA keep them?

Upvotes: 0

Views: 842

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 402591

sbt-idea plugin has ideaPackagePrefix property. See also the related feature request.

More details can be found here.

Upvotes: 1

Related Questions