boolean (@NotNull Project project, Editor editor, PsiFile file) { if (myStartElement == null) return false; final PsiElement startElement = myStartElement.getElement(); final PsiElement endElement = myEndElement == null ? startElement : myEndElement.getElement(); return startElement != null && endElement != null && startElement.isValid() && (endElement == startElement || endElement.isValid()) && file != null && isAvailable(project, file, editor, startElement, endElement); }