boolean (@Nullable PsiElement child) { if (child != null) { if (child.getParent() instanceof XmlTag) { if (child instanceof XmlToken) { if (((XmlToken)child).getTokenType() == XmlTokenType.XML_NAME) { return true; } } else if (child instanceof ASTNode) { return ((ASTNode)child).getElementType() == XmlTokenType.XML_NAME; } } } return false; }