boolean (@NotNull PsiNamedElement element) { if (element.getName() == null) return false; return CachedValuesManager.getCachedValue(element, () -> { PsiFile file = element.getContainingFile(); return CachedValueProvider.Result.create(calcCheapEnoughToSearchInFile(element, file), file); }); }