Package prefix to a folder containing Java sources

Hi,

There is option in the Idea for assigning a package prefix to a folder containing Java sources. How can I do this same in sbt configuration file? Every time after refreshing a project after making changes in a file.sbt, I have to manually set this package prefix, what is annoying. Is there any solution?

Regards

Daniel Roziecki

1
4 comments
Avatar
Permanently deleted user

You probably want this

https://github.com/JetBrains/sbt-ide-settings/blob/master/README.md

See the ideBasePackages setting

0
Avatar
Permanently deleted user

Hello,

maybe you are right but I don't understand what this property really do, and how should I use it.

"ideBasePackages :: Seq[String]
List of packages to be used as base prefixes for chaining. Packages starting with one of these prefixes will be chained automatically in IDE."

Now I have generated source code in:

xxx/yyy/zzz/generated/sub_directores_with_sources

I manually set "generated" as directory with "generated sources root" and I manually set prefix to it in Idea.

Regards

Daniel Roziecki

0
Avatar
Permanently deleted user

Oh nevermind, I thought for some reason you were referring to setting a base package for splitting the package lines

e.g.

having intellij write

package foo.bar
package bang

instead of

package foo.bar.bang

when you make a new file

0
Avatar
Permanently deleted user

Hi!

Try adding 'xxx/yyy/zzz/generated' into managedSourceDirectories in your build definition:

managedSourceDirectories += file("xxx/yyy/zzz/generated");

0

Please sign in to leave a comment.