@Override
  public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
    final PsiModifierListOwner owner = AddAnnotationPsiFix.getContainer(file, editor.getCaretModel().getOffset());
    if (owner == null || owner.getModifierList() == null || !ExternalAnnotationsManagerImpl.areExternalAnnotationsApplicable(owner)) {
      return false;
    }
    List<AnnotationProvider> annotations = availableAnnotations(owner, project).limit(2).toList();
    if (annotations.isEmpty()) return false;
    if (mySingleAnnotationName != null && canAnnotateWith(file, owner, mySingleAnnotationName)) return true;
    if (annotations.size() == 1) {
      String providerName = annotations.get(0).getName(project);
      setText(AddAnnotationPsiFix.calcText(owner, providerName));
    }
    else {
      setText(AddAnnotationPsiFix.calcText(owner, null));
    }
    return true;
  }
@Override
  public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file)