Configurable[] () { CodeStyleGroupProviderFactory groupProviderFactory = new CodeStyleGroupProviderFactory(getModel(), this); myPanels = new ArrayList<>(); Comparator<CodeStyleSettingsProvider> providerComparator = (p1, p2) -> DisplayPrioritySortable.compare(p1, p2, p -> p.getConfigurableDisplayName()); final List<CodeStyleSettingsProvider> providers = new ArrayList<>(); providers.addAll(CodeStyleSettingsProvider.EXTENSION_POINT_NAME.getExtensionList()); providers.addAll(LanguageCodeStyleSettingsProvider.getSettingsPagesProviders()); // sort so that CodeStyleGroupProvider get their children sorted providers.sort(providerComparator); List<CodeStyleSettingsProvider> settingsProviders = new ArrayList<>(); Set<CodeStyleGroupProvider> addedGroupProviders = new HashSet<>(); for (final CodeStyleSettingsProvider provider : providers) { CodeStyleGroup group = provider.getGroup(); if (group != null) { CodeStyleGroupProvider groupProvider = groupProviderFactory.getGroupProvider(group); groupProvider.addChildProvider(provider); if (addedGroupProviders.add(groupProvider)) { settingsProviders.add(groupProvider); } } else if (provider.hasSettingsPage()) { settingsProviders.add(provider); } } // sort again: replacement CodeStyleGroupProvider might have a different name and order settingsProviders.sort(providerComparator); for (CodeStyleSettingsProvider provider : settingsProviders) { if (provider instanceof CodeStyleGroupProvider groupProvider) { myPanels.add(groupProvider.createConfigurable()); } else { myPanels.add(ConfigurableFactory.getInstance().createCodeStyleConfigurable(provider, getModel(), this)); } } int size = myPanels.size(); Configurable[] result = new Configurable[size > 0 ? size - 1 : 0]; for (int i = 0; i < result.length; i++) { result[i] = myPanels.get(i + 1); } return result; }