Skip to content

Commit 3f3c52c

Browse files
authored
fix: Read access is allowed from inside read-action (or EDT) (#745)
Fixes #726 Signed-off-by: Jeff MAURY <jmaury@redhat.com>
1 parent 4ee0a0f commit 3f3c52c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/redhat/devtools/intellij/quarkus/lsp4ij/LSPIJUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static Document getDocument(VirtualFile docFile) {
108108

109109
public static Module getProject(VirtualFile file) {
110110
for (Project project : ProjectManager.getInstance().getOpenProjects()) {
111-
Module module = ProjectFileIndex.getInstance(project).getModuleForFile(file);
111+
Module module = ReadAction.compute(() -> ProjectFileIndex.getInstance(project).getModuleForFile(file));
112112
if (module != null) {
113113
return module;
114114
}

0 commit comments

Comments
 (0)