Since (thankfully) a package declaration doesn’t need to match the directory structure, like in Java, it would be great if there could be a way in IDEA to define, say, a root package which would be picked up by all package declarations. This would mean no “package directive does not match file” warnings and when automatically generating package declarations would take into account the root package. This would mean a lot less directory clutter.
E.g. my package is com.foo.bar.baz.mycompany.api. All the directories until api only exist to define the package structure. If I could put somewhere basePackage = “com.foo.bar.baz.mycompany” then use the “api” folder as the base folder, as it were, it would help with folder clutter. Then when I defined a new class under “api”, instead of making the package “api”, it would prepend the base package value.
It would also solve the problem referenced here: https://youtrack.jetbrains.com/issue/SCL-6875