public static @Nullable PropertiesFile findBundlePropertiesFile(@Nullable DomElement domElement) {
    XmlElement bundleXmlElement = null;

    Actions actions = null;
    if (domElement instanceof ActionOrGroup ||
        domElement instanceof Separator ||
        domElement instanceof OverrideText ||
        domElement instanceof Synonym) {
      actions = DomUtil.getParentOfType(domElement, Actions.class, true);
      if (actions == null) return null;

      bundleXmlElement = DomUtil.hasXml(actions.getResourceBundle()) ? actions.getResourceBundle().getXmlAttributeValue() : null;
    }

    if (bundleXmlElement == null) {
      final IdeaPlugin ideaPlugin = DomUtil.getParentOfType(domElement, IdeaPlugin.class, true);
      if (ideaPlugin == null) return null;

      bundleXmlElement = DomUtil.hasXml(ideaPlugin.getResourceBundle()) ? ideaPlugin.getResourceBundle().getXmlElement() : null;
    }

    if (bundleXmlElement == null) {
      return findCoreActionsBundlePropertiesFile(actions);
    }

    final ResourceBundleReference bundleReference =
      ContainerUtil.findInstance(bundleXmlElement.getReferences(), ResourceBundleReference.class);
    if (bundleReference == null) return null;

    return ObjectUtils.tryCast(bundleReference.resolve(), PropertiesFile.class);
  }
public static @Nullable PropertiesFile findBundlePropertiesFile(@Nullable DomElement domElement)