mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
[java-imports] IDEA-368382 incorrect place for module import
- more tests (cherry picked from commit 5b0b65e0b74bb858dab0a0ceeb5f176b0e3f0fdc) IJ-CR-156496 GitOrigin-RevId: 11f88eff3e5ac2934721b175fb94d34f91a5daed
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8830d6dde5
commit
314374a7c2
11
java/java-tests/testData/codeStyle/onlyModules.xml
Normal file
11
java/java-tests/testData/codeStyle/onlyModules.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<code_scheme name="Project" version="173">
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
|
||||
<option name="IMPORT_LAYOUT_TABLE">
|
||||
<value>
|
||||
<package name="" withSubpackages="true" static="false" module="true" />
|
||||
</value>
|
||||
</option>
|
||||
</JavaCodeStyleSettings>
|
||||
</code_scheme>
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user