Collection<OptionDescription> (@NotNull Project project) { BooleanOptionDescription enabled = new PublicMethodBasedOptionDescription(LangBundle.message("label.file.colors.enabled"), "reference.settings.ide.settings.file-colors", "isEnabled", "setEnabled", () -> FileColorManager.getInstance(project)) { @Override protected void fireUpdated() { UISettings.getInstance().fireUISettingsChanged(); } }; if (!enabled.isOptionEnabled()) { return Collections.singletonList(enabled); } return List.of( enabled, new BooleanOptionDescription(LangBundle.message("label.use.file.colors.in.editor.tabs"), "reference.settings.ide.settings.file-colors") { @Override public boolean isOptionEnabled() { return FileColorManagerImpl._isEnabledForTabs(); } @Override public void setOptionState(boolean value) { FileColorManagerImpl.setEnabledForTabs(value); } }, new BooleanOptionDescription(LangBundle.message("label.use.file.colors.in.project.view"), "reference.settings.ide.settings.file-colors") { @Override public boolean isOptionEnabled() { return FileColorManagerImpl._isEnabledForProjectView(); } @Override public void setOptionState(boolean value) { FileColorManagerImpl.setEnabledForProjectView(value); } } ); }