void (@Nullable Disposable disposable) { FileIndentOptionsProvider.EP_NAME.addChangeListener(this::notifyCodeStyleSettingsChanged, disposable); CodeStyleSettingsService.getInstance().addListener(new CodeStyleSettingsServiceListener() { @Override public void fileTypeIndentOptionsFactoryAdded(@NotNull FileTypeIndentOptionsFactory factory) { registerFileTypeIndentOptions(getAllSettings(), factory.getFileType(), factory.createIndentOptions()); } @Override public void fileTypeIndentOptionsFactoryRemoved(@NotNull FileTypeIndentOptionsFactory factory) { unregisterFileTypeIndentOptions(getAllSettings(), factory.getFileType()); } @Override public void languageCodeStyleProviderAdded(@NotNull LanguageCodeStyleProvider provider) { registerLanguageSettings(getAllSettings(), provider); registerCustomSettings(getAllSettings(), provider); } @Override public void languageCodeStyleProviderRemoved(@NotNull LanguageCodeStyleProvider provider) { unregisterLanguageSettings(getAllSettings(), provider); unregisterCustomSettings(getAllSettings(), provider); } @Override public void customCodeStyleSettingsFactoryAdded(@NotNull CustomCodeStyleSettingsFactory factory) { registerCustomSettings(getAllSettings(), factory); } @Override public void customCodeStyleSettingsFactoryRemoved(@NotNull CustomCodeStyleSettingsFactory factory) { unregisterCustomSettings(getAllSettings(), factory); } }, disposable); }