boolean (@NotNull Project project, @NotNull VirtualFile file) { ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex(); return index.isInContent(file) && !index.isInLibrarySource(file); }