boolean () { if (myStartElement == null) return false; final PsiElement startElement = myStartElement.getElement(); final PsiElement endElement = myEndElement == null ? startElement : myEndElement.getElement(); PsiFile file = myStartElement.getContainingFile(); Project project = myStartElement.getProject(); return startElement != null && endElement != null && file != null && isAvailable(project, file, startElement, endElement); }