diff --git a/java/java-tests/testData/codeStyle/onlyModules.xml b/java/java-tests/testData/codeStyle/onlyModules.xml new file mode 100644 index 000000000000..3512f4b25d87 --- /dev/null +++ b/java/java-tests/testData/codeStyle/onlyModules.xml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/java/psi/codeStyle/JavaCodeStyleSettingsTest.java b/java/java-tests/testSrc/com/intellij/java/psi/codeStyle/JavaCodeStyleSettingsTest.java index 43d2f2429fba..5ddd141e4601 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/codeStyle/JavaCodeStyleSettingsTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/codeStyle/JavaCodeStyleSettingsTest.java @@ -207,6 +207,18 @@ public class JavaCodeStyleSettingsTest extends CodeStyleTestCase { assertEquals(PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY, table.getEntryAt(7)); } + public void testOnlyModules() throws SchemeImportException { + CodeStyleSettings settings = importSettings(); + + JavaCodeStyleSettings customSettings = settings.getCustomSettings(JavaCodeStyleSettings.class); + + PackageEntryTable table = customSettings.IMPORT_LAYOUT_TABLE; + assertSize(3, table.getEntries()); + assertEquals(PackageEntry.ALL_MODULE_IMPORTS, table.getEntryAt(0)); + assertEquals(PackageEntry.ALL_OTHER_IMPORTS_ENTRY, table.getEntryAt(1)); + assertEquals(PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY, table.getEntryAt(2)); + } + public void testWithoutOtherImportWithModule() throws SchemeImportException { CodeStyleSettings settings = importSettings();