public static @NotNull Map<String, XmlAttributeValue> collectFileIds(@Nullable PsiFile psiFile, boolean skipController) {
    if (!(psiFile instanceof XmlFile)) return Collections.emptyMap();
    final XmlTag rootTag = ((XmlFile)psiFile).getRootTag();
    if (rootTag == null) return Collections.emptyMap();

    final Map<String, XmlAttributeValue> cachedIds = CachedValuesManager
      .getCachedValue(rootTag, () -> new CachedValueProvider.Result<>(prepareFileIds(rootTag), PsiModificationTracker.MODIFICATION_COUNT));
    if (skipController && cachedIds.containsKey(FxmlConstants.CONTROLLER)) {
      final Map<String, XmlAttributeValue> filteredIds = new HashMap<>(cachedIds);
      filteredIds.remove(FxmlConstants.CONTROLLER);
      return filteredIds;
    }
    return cachedIds;
  }
public static @NotNull Map<String, XmlAttributeValue> collectFileIds(@Nullable PsiFile psiFile, boolean skipController)