CachedValue<HtmlLabelsHolder> (final XmlFile file, final Object p) { return CachedValuesManager.getManager(file.getProject()).createCachedValue(() -> { final HtmlLabelsHolder holder = new HtmlLabelsHolder(); final Language language = file.getViewProvider().getBaseLanguage(); final PsiFile psiFile = file.getViewProvider().getPsi(language); if (psiFile != null) { psiFile.accept(new LabelGatheringRecursiveVisitor(holder)); return new CachedValueProvider.Result<>(holder, file); } return null; }, false); }