diff --git a/json/src/com/jetbrains/jsonSchema/JsonSchemaVfsListener.java b/json/src/com/jetbrains/jsonSchema/JsonSchemaVfsListener.java index cfd9d8525d58..171e4701eddb 100644 --- a/json/src/com/jetbrains/jsonSchema/JsonSchemaVfsListener.java +++ b/json/src/com/jetbrains/jsonSchema/JsonSchemaVfsListener.java @@ -75,7 +75,7 @@ public class JsonSchemaVfsListener extends BulkVirtualFileListenerAdapter { Collection scope = new HashSet<>(myDirtySchemas); myDirtySchemas.removeAll(scope); - Collection finalScope = ContainerUtil.filter(scope, file -> myService.isApplicableToFile(file) && myService.isSchemaFile(file)); + Collection finalScope = ReadAction.compute(() -> ContainerUtil.filter(scope, file -> myService.isApplicableToFile(file) && myService.isSchemaFile(file))); if (finalScope.isEmpty()) return; myProject.getMessageBus().syncPublisher(JSON_SCHEMA_CHANGED).run();