Collection<FileTargetContext> (@NotNull Project project, @NotNull VirtualFile hostFile, boolean isAbsoluteReference) { if (isAbsoluteReference) { ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex(); Module module = index.getModuleForFile(hostFile); if (module == null) { return emptyList(); } return ContainerUtil.map(getRoots(module, hostFile), FileTargetContext::new); } return ContainerUtil.map(getContexts(project, hostFile), FileTargetContext::new); }