PsiElement (PsiElement leaf, @Nullable final String id, int offset) { while (leaf != null && leaf.getTextOffset() >= offset) { if (isSuppressedInComment(leaf, id)) { return leaf; } else if (leaf instanceof XmlText || leaf instanceof XmlProlog) { for (PsiElement child : leaf.getChildren()) { if (isSuppressedInComment(child, id)) { return leaf; } } } leaf = leaf.getPrevSibling(); if (leaf instanceof XmlTag) { return null; } } return null; }