public boolean isAvailable(@NotNull Project project, @Nullable Editor editor, @NotNull PsiFile file) {
    Presentation presentation = getPresentation(ActionContext.from(editor, file));
    return presentation != null;
  }
public boolean isAvailable(@NotNull Project project, @Nullable Editor editor, @NotNull PsiFile file)