@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    if (editor == null || EditorUtil.getSelectionInAnyMode(editor).isEmpty()) return;
    ScratchFileCreationHelper.Context context = ScratchFileActions.createContext(
      project, file, editor, ((EditorEx)editor).getDataContext());
    doCreateNewScratch(project, context);
  }
@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file)