void (PsiFile context, Processor<? super Pair<VirtualFile, FileIncludeInfo>> processor) { context = context.getOriginalFile(); VirtualFile contextFile = context.getVirtualFile(); if (contextFile == null) return; if (FileBasedIndex.getInstance().getFileBeingCurrentlyIndexed() != null) return; String originalName = context.getName(); Collection<String> names = getPossibleIncludeNames(context, originalName); GlobalSearchScope scope = GlobalSearchScope.allScope(myProject); for (String name : names) { MultiMap<VirtualFile,FileIncludeInfoImpl> infoList = FileIncludeIndex.getIncludingFileCandidates(name, scope); for (VirtualFile candidate : infoList.keySet()) { PsiFile psiFile = myPsiManager.findFile(candidate); if (psiFile == null || context.equals(psiFile)) continue; for (FileIncludeInfo info : infoList.get(candidate)) { PsiFileSystemItem item = resolveFileInclude(info, psiFile); if (item != null && contextFile.equals(item.getVirtualFile())) { if (!processor.process(Pair.create(candidate, info))) { return; } } } } } }