boolean (@NotNull final PsiFile psiFile, @NotNull final CoverageSuitesBundle suite) { final VirtualFile virtualFile = psiFile.getVirtualFile(); if (virtualFile == null) return false; final Project project = psiFile.getProject(); if (!suite.isTrackTestFolders() && ReadAction.compute(() -> TestSourcesFilter.isTestSources(virtualFile, project))) { return false; } for (CoverageSuite coverageSuite : suite.getSuites()) { final JavaCoverageSuite javaSuite = (JavaCoverageSuite)coverageSuite; if (psiFile instanceof PsiClassOwner && javaSuite.isPackageFiltered(ReadAction.compute(() -> ((PsiClassOwner)psiFile).getPackageName()))) { return true; } else { final List<PsiClass> classes = javaSuite.getCurrentSuiteClasses(project); for (PsiClass aClass : classes) { final PsiFile containingFile = ReadAction.compute(aClass::getContainingFile); if (psiFile.equals(containingFile)) { return true; } } } } return false; }