private static @Nullable String findComponentName(Element element) {
      var componentElement = element;
      while (true) {
        var parent = componentElement.getParent();
        if (!(parent instanceof Element)) break;
        componentElement = (Element)parent;
      }
      return Strings.nullize(componentElement.getAttributeValue(ComponentStorageUtil.NAME));
    }
private static @Nullable String findComponentName(Element element)