boolean (@NotNull PsiFile file) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile != null && ProjectRootManager.getInstance(file.getProject()).getFileIndex().isInLibraryClasses(virtualFile)) { return true; } return false; }