@Override
  public @NotNull String getType(@NotNull PsiElement element) {
    if (element instanceof XmlTag) {
      final PsiMetaData metaData = ((XmlTag)element).getMetaData();
      if (metaData != null && metaData.getDeclaration() instanceof XmlTag) {
        return ((XmlTag)metaData.getDeclaration()).getName();
      }
      return XmlPsiBundle.message("xml.terms.xml.tag");
    }
    if (element instanceof XmlElementDecl) {
      return XmlPsiBundle.message("xml.terms.tag");
    }
    else if (element instanceof XmlAttributeDecl) {
      return XmlPsiBundle.message("xml.terms.attribute");
    }
    else if (element instanceof XmlAttributeValue) {
      return XmlPsiBundle.message("xml.terms.attribute.value");
    }
    else if (element instanceof XmlEntityDecl) {
      return XmlPsiBundle.message("xml.terms.entity");
    }
    else if (element instanceof XmlAttribute) {
      return XmlPsiBundle.message("xml.terms.attribute");
    } else if (element instanceof XmlComment) {
      return XmlPsiBundle.message("xml.terms.variable");
    }
    throw new IllegalArgumentException("Cannot get type for " + element);
  }
@Override
  public @NotNull String getType(@NotNull PsiElement element)