boolean (@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { PsiClass classToExtendFrom = myClassToExtendFromPointer != null ? myClassToExtendFromPointer.getElement() : null; return super.isAvailable(project, file, startElement, endElement) && classToExtendFrom != null && classToExtendFrom.isValid() && classToExtendFrom.getQualifiedName() != null ; }