From b88cfd79adb7d4312999fc066beaaf4e00b6cda9 Mon Sep 17 00:00:00 2001 From: Anton Lobov Date: Mon, 16 Jul 2018 15:04:08 +0200 Subject: [PATCH] JsonSchemaService.isSchemaFile requires read action --- json/src/com/jetbrains/jsonSchema/JsonSchemaVfsListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();