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