boolean (@NotNull PsiElement element) { if (element.getContainingFile() instanceof RncFile) { final RncDefine define = PsiTreeUtil.getParentOfType(element, RncDefine.class, false); if (define != null) { if (isSuppressedAt(define)) return true; } final RncGrammar grammar = PsiTreeUtil.getParentOfType(define, RncGrammar.class); if (grammar != null) { if (isSuppressedAt(grammar)) return true; } return false; } else { return super.isSuppressedFor(element); } }