boolean () { if (!Registry.is("projectView.showHierarchyErrors")) return false; Project project = getProject(); WolfTheProblemSolver wolf = project == null ? null : WolfTheProblemSolver.getInstance(project); return wolf != null && wolf.hasProblemFilesBeneath(virtualFile -> { Value value; return contains(virtualFile) // in case of flattened packages, when package node a.b.c contains error file, node a.b might not. && ((value = getValue()) instanceof PsiElement && Comparing.equal(PsiUtilCore.getVirtualFile((PsiElement)value), virtualFile) || someChildContainsFile(virtualFile)); }); }