public static <T extends DomElement> DomFileElement<T> getFileElement(@NotNull DomElement element) {
    if (element instanceof DomFileElement domFileElement) {
      return domFileElement;
    }
    DomFileElement fileElement = element.getUserData(FILE_ELEMENT_KEY);
    if (fileElement == null) {
      DomElement parent = element.getParent();
      if (parent != null) {
        fileElement = getFileElement(parent);
      }
      element.putUserData(FILE_ELEMENT_KEY, fileElement);
    }
    return fileElement;
  }
public static <T extends DomElement> DomFileElement<T> getFileElement(@NotNull DomElement element)