diff --git a/platform/lang-api/src/com/intellij/application/options/CodeStyleCachedValueProvider.java b/platform/lang-api/src/com/intellij/application/options/CodeStyleCachedValueProvider.java index b3038dd1f758..a489d5482541 100644 --- a/platform/lang-api/src/com/intellij/application/options/CodeStyleCachedValueProvider.java +++ b/platform/lang-api/src/com/intellij/application/options/CodeStyleCachedValueProvider.java @@ -90,15 +90,6 @@ class CodeStyleCachedValueProvider implements CachedValueProvider computeSettings()) - .finishOnUiThread(ModalityState.NON_MODAL, val -> notifyCachedValueComputed(myFile)) + .expireWith(myProject) + .finishOnUiThread(ModalityState.NON_MODAL, val -> notifyCachedValueComputed()) .submit(ourExecutorService); } else { @@ -141,10 +135,10 @@ class CodeStyleCachedValueProvider implements CachedValueProvider notifyCachedValueComputed(myFile), ModalityState.any()); + application.invokeLater(() -> notifyCachedValueComputed(), ModalityState.any()); } } @@ -194,5 +188,13 @@ class CodeStyleCachedValueProvider implements CachedValueProvider