boolean (final @NotNull Project project, final @NotNull VirtualFile file) { final ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex(); return index.isInSourceContent(file); }