List<VirtualFile> (@NotNull VirtualFile libraryFile) { ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myPsiManager.getProject()).getFileIndex(); Set<VirtualFile> result = new LinkedHashSet<>(); for (OrderEntry entry : fileIndex.getOrderEntriesForFile(libraryFile)) { ProgressManager.checkCanceled(); if (!(entry instanceof ModuleOrderEntry)) { Collections.addAll(result, AnnotationOrderRootType.getFiles(entry)); } } ContainerUtil.addIfNotNull(result, getAdditionalAnnotationRoot()); return new ArrayList<>(result); }