boolean (@NotNull VirtualFile file, @NotNull Project project) { ProjectFileIndex index = ProjectFilesScope.getFileIndex(project); return index != null && index.isInSource(file) && !index.isInLibrary(file) && !TestSourcesFilter.isTestSources(file, project); }