[java-imports] IDEA-368382 incorrect place for module import

- support static separately


(cherry picked from commit 8d1acc0e8d2bd7d60b1f03b1ebe367d7d9f2e2a9)

IJ-CR-156496

GitOrigin-RevId: d109ac92ad1c67ef65b4267cc752475b98fa267e
This commit is contained in:
Mikhail Pyltsin
2025-03-01 16:39:10 +01:00
committed by intellij-monorepo-bot
parent f99f182609
commit f82340ac1c
3 changed files with 35 additions and 1 deletions

View File

@@ -464,7 +464,7 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings implements Im
}
else {
//if something is missed, restore it
if (!ContainerUtil.exists(entries, entry -> entry == PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY)) {
if (LAYOUT_STATIC_IMPORTS_SEPARATELY && !ContainerUtil.exists(entries, entry -> entry == PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY)) {
if (entries[0] == PackageEntry.ALL_MODULE_IMPORTS) {
IMPORT_LAYOUT_TABLE.insertEntryAt(PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY, 1);
}