@Override
  public @NotNull List<DomElementProblemDescriptor> checkNameIdentity(DomElement element, final DomElementAnnotationHolder holder) {
    final String elementName = ElementPresentationManager.getElementName(element);
    if (StringUtil.isNotEmpty(elementName)) {
      final DomElement domElement = DomUtil.findDuplicateNamedValue(element, elementName);
      if (domElement != null) {
        final String typeName = ElementPresentationManager.getTypeNameForObject(element);
        final GenericDomValue genericDomValue = domElement.getGenericInfo().getNameDomElement(element);
        if (genericDomValue != null) {
          return Collections.singletonList(holder.createProblem(genericDomValue, DomUtil.getFile(domElement).equals(DomUtil.getFile(element))
                                                                 ? XmlDomBundle.message("dom.inspections.identity", typeName)
                                                                 : XmlDomBundle.message("dom.inspections.identity.in.other.file", typeName,
                                                                                        domElement.getXmlTag().getContainingFile()
                                                                                       .getName())));
        }
      }
    }
    return Collections.emptyList();
  }
@Override
  public @NotNull List<DomElementProblemDescriptor> checkNameIdentity(DomElement element, final DomElementAnnotationHolder holder)