@Override
  public final boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
    if (file == null || editor == null) return false;
    PsiElement element = getElement(editor, file);
    return element != null && isAvailable(project, editor, element);
  }
@Override
  public final boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file)