public static XmlExtension getExtension(final @NotNull PsiFile file) {
    return CachedValuesManager.getCachedValue(file, () -> CachedValueProvider.Result.create(calcExtension(file), PsiModificationTracker.MODIFICATION_COUNT));
  }
public static XmlExtension getExtension(final @NotNull PsiFile file)