boolean (@NotNull PsiModifierListOwner owner) { VirtualFile file = PsiUtilCore.getVirtualFile(owner); if (file == null) { return false; } final List<OrderEntry> entries = ProjectRootManager.getInstance(owner.getProject()) .getFileIndex() .getOrderEntriesForFile(file); return ContainerUtil.exists(entries, entry -> entry instanceof LibraryOrSdkOrderEntry && ContainerUtil.filter(AnnotationOrderRootType.getFiles(entry), VirtualFile::isInLocalFileSystem).size() == 1); }