PsiElement (PsiElement anchor, String id, PsiElement originalElement) { final PsiFile file = anchor.getContainingFile(); if (file instanceof XmlFile) { final XmlDocument document = ((XmlFile)file).getDocument(); final XmlTag rootTag = document != null ? document.getRootTag() : null; PsiElement leaf = rootTag != null ? rootTag.getPrevSibling() : file.findElementAt(0); return findSuppressionLeaf(leaf, id, 0); } return null; }