Skip to content

Commit

Permalink
Issue 708 - Needed the search for external references to occur in a r…
Browse files Browse the repository at this point in the history
…ead action. I'm unfortunately unable to reproduce the actual error seen by the reporting user in 2023.2 or 2024.3, but wrapping the entire call in a read action should resolve all downstream requirements for the read lock.
  • Loading branch information
SCWells72 committed Dec 17, 2024
1 parent 926caf2 commit 49760af
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public void processElementUsages(@NotNull PsiElement element, @NotNull Processor
}

// For completeness' sake, also collect external usages to LSP (pseudo-)elements
LSPExternalReferencesFinder.processExternalReferences(file, element.getTextOffset(), reference -> processor.process(new UsageInfo2UsageAdapter(new UsageInfo(reference))));
ReadAction.run(() -> LSPExternalReferencesFinder.processExternalReferences(
file,
element.getTextOffset(),
reference -> processor.process(new UsageInfo2UsageAdapter(new UsageInfo(reference)))
));
}

@Nullable
Expand Down

0 comments on commit 49760af

Please sign in to comment.