wrap with read action

This commit is contained in:
Dmitry Batkovich
2018-09-27 17:13:48 +03:00
parent 57aeb40490
commit 728cdfee49
@@ -302,7 +302,7 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext
List<SmartPsiElementPointer> sortedIDs = getSortedIDs(myQNameUsagesRequests);
for (SmartPsiElementPointer id : sortedIDs) {
final UClass uClass = ReadAction.compute(() -> UastContextKt.toUElement(dereferenceInReadAction(id), UClass.class));
String qualifiedName = uClass != null ? uClass.getQualifiedName() : null;
String qualifiedName = uClass != null ? ReadAction.compute(() -> uClass.getQualifiedName()) : null;
if (qualifiedName != null) {
List<Runnable> callbacks = myQNameUsagesRequests.get(id);
final GlobalSearchScope projectScope = GlobalSearchScope.projectScope(context.getProject());