PsiElement () { final XmlTag tag = (XmlTag)myElement.getParent().getParent(); final XmlAttribute name = tag.getAttribute("name",null); if (name != null) { return name.getValueElement(); } return null; }