private void createTask(@Nullable AnActionEvent e, BeforeRunTaskProvider<BeforeRunTask<?>> myProvider) {
    BeforeRunTask<?> task = myProvider.createTask(myConfiguration);
    if (task == null) return;
    TaskButton tag = createTag(myProvider);
    if (e == null) {
      addTask(tag, task);
      return;
    }
    myProvider.configureTask(e.getDataContext(), myConfiguration, task).onSuccess(changed -> {
      if (!myProvider.canExecuteTask(myConfiguration, task)) {
        return;
      }
      addTask(tag, task);
    });
  }
private void createTask(@Nullable AnActionEvent e, BeforeRunTaskProvider<BeforeRunTask<?>> myProvider)