boolean (@NotNull PsiElement element) { TextRange textRange = element.getTextRange(); if (textRange == null) { return false; } for (PsiElement parent = element; parent != null && textRange.equals(parent.getTextRange()); parent = parent.getParent()) { ASTNode parentNode = parent.getNode(); if (parentNode != null && myEnabledTypes.contains(parentNode.getElementType())) { return true; } } return false; }