void (AnnotationHolder holder, XPathNodeTest nodeTest) { if (nodeTest.getPrincipalType() != XPathNodeTest.PrincipalType.ELEMENT) { final XPathNodeTypeTest typeTest = PsiTreeUtil.getChildOfType(nodeTest, XPathNodeTypeTest.class); if (typeTest != null) { holder.newAnnotation(HighlightSeverity.WARNING, XPathBundle.message("annotator.warning.silly.node.type.test.on.axis", nodeTest.getPrincipalType().getType())).range(typeTest).create(); } } }