boolean (@NotNull Project project, @NotNull VirtualFile file) { if (!ProjectFileIndex.getInstance(project).isInSource(file)) return false; String path = file.getCanonicalPath(); // for plugins testdata ProjectFileIndex#isInSource returns true return path != null && !path.contains("testData"); }