boolean (final VirtualFile vFile) { if (vFile == null) { return false; } ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(myProject).getFileIndex(); return projectFileIndex.isInLibrary(vFile) && !projectFileIndex.isInSourceContent(vFile); }