private void addProblemToTagName(PsiElement currentElement,
                                   final PsiElement originalElement,
                                   final @InspectionMessage String localizedMessage,
                                   final ValidateXmlActionHandler.ProblemType problemType) {
    currentElement = PsiTreeUtil.getParentOfType(currentElement,XmlTag.class,false);
    if (currentElement==null) {
      currentElement = PsiTreeUtil.getParentOfType(originalElement,XmlElementDecl.class,false);
    }
    if (currentElement == null) {
      currentElement = originalElement;
    }
    assertValidElement(currentElement, originalElement,localizedMessage);

    if (currentElement!=null) {
      myHost.addMessage(currentElement,localizedMessage, getProblemType(problemType));
    }
  }
private void addProblemToTagName(PsiElement currentElement,
                                   final PsiElement originalElement,
                                   final @InspectionMessage String localizedMessage,
                                   final ValidateXmlActionHandler.ProblemType problemType)