void () { CodeStyle.dropTemporarySettings(getProject()); MockCodeStyleSettingsModifier modifier = new MockCodeStyleSettingsModifier( getTestName(false) + ".java", settings -> { JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class); javaSettings.IMPORT_LAYOUT_TABLE = new PackageEntryTable(); javaSettings.IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY); javaSettings.IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.BLANK_LINE_ENTRY); javaSettings.IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.ALL_OTHER_IMPORTS_ENTRY); }); ServiceContainerUtil.registerExtension(ApplicationManager.getApplication(), CodeStyleSettingsModifier.EP_NAME, modifier, getTestRootDisposable()); doTest(); }