Module (@NotNull VirtualFile file, @NotNull Project project) { if (project.isDefault()) { return null; } return ReadAction.compute(() -> ProjectFileIndex.getInstance(project).getModuleForFile(file)); }