void (@NotNull Project project) { List<CompilerOptionsFilter> managers = CompilerOptionsFilter.EP_NAME.getExtensionList(); boolean showExternalBuildSetting = true; for (CompilerOptionsFilter manager : managers) { showExternalBuildSetting = manager.isAvailable(Setting.EXTERNAL_BUILD, project); if (!showExternalBuildSetting) { myDisabledSettings.add(Setting.EXTERNAL_BUILD); break; } } for (Setting setting : Setting.values()) { if (!showExternalBuildSetting && EXTERNAL_BUILD_SETTINGS.contains(setting)) { // Disable all nested external compiler settings if 'use external build' is unavailable. myDisabledSettings.add(setting); } else { for (CompilerOptionsFilter manager : managers) { if (!manager.isAvailable(setting, project)) { myDisabledSettings.add(setting); break; } } } } Map<Setting, Collection<JComponent>> controls = Map.ofEntries( Map.entry(Setting.RESOURCE_PATTERNS, List.of(myResourcePatternsLabel, myResourcePatternsField, myPatternLegendLabel)), Map.entry(Setting.CLEAR_OUTPUT_DIR_ON_REBUILD, Collections.singleton(myCbClearOutputDirectory)), Map.entry(Setting.ADD_NOT_NULL_ASSERTIONS, Collections.singleton(myAssertNotNullPanel)), Map.entry(Setting.AUTO_SHOW_FIRST_ERROR_IN_EDITOR, Collections.singleton(myCbAutoShowFirstError)), Map.entry(Setting.DISPLAY_NOTIFICATION_POPUP, Collections.singleton(myCbDisplayNotificationPopup)), Map.entry(Setting.AUTO_MAKE, List.of(myCbEnableAutomake, myEnableAutomakeLegendLabel)), Map.entry(Setting.PARALLEL_COMPILATION, List.of(myCbParallelCompilation, myParallelCompilationLegendLabel)), Map.entry(Setting.REBUILD_MODULE_ON_DEPENDENCY_CHANGE, List.of(myCbRebuildOnDependencyChange)), Map.entry(Setting.HEAP_SIZE, List.of(myHeapSizeLabel, myHeapSizeField, mySharedHeapSizeLabel, mySharedHeapSizeField)), Map.entry(Setting.COMPILER_VM_OPTIONS, List.of(myVMOptionsLabel, myVMOptionsField, mySharedVMOptionsLabel, mySharedVMOptionsField))); for (Setting setting : myDisabledSettings) { Collection<JComponent> components = controls.get(setting); if (components != null) { for (JComponent component : components) { component.setVisible(false); } } } }