boolean (final Project project, final VirtualFile file) { final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); return ReadAction.compute(() -> projectFileIndex.isInLibraryClasses(file) && !projectFileIndex.isInSource(file)); }