@NotNull
  protected Promise<@Nullable RunContentDescriptor> doExecuteAsync(@NotNull TargetEnvironmentAwareRunProfileState state,
                                                                   @NotNull ExecutionEnvironment env)
    throws ExecutionException {
    FileDocumentManager.getInstance().saveAllDocuments();
    boolean isLocal = !((TargetEnvironmentAwareRunProfile)env.getRunProfile()).needPrepareTarget();
    if (!isLocal && !isExecutorSupportedOnTarget(env)) {
      throw new ExecutionException(
        ExecutionBundle.message("run.configuration.action.is.supported.for.local.machine.only", env.getExecutor().getActionName())
      );
    }

    return state.prepareTargetToCommandExecution(env, LOG,"Failed to execute java run configuration async", () -> {
      @Nullable ProcessProxy proxy = null;
      if (state instanceof JavaCommandLine) {
        patchJavaCommandLineParams((JavaCommandLine)state, env);
        if (isLocal) {
          proxy = ProcessProxyFactory.getInstance().createCommandLineProxy((JavaCommandLine)state);
        }
      }

      return executeJavaState(state, env, proxy);
    });
  }
@NotNull
  protected Promise<@Nullable RunContentDescriptor> doExecuteAsync(@NotNull TargetEnvironmentAwareRunProfileState state,
                                                                   @NotNull ExecutionEnvironment env)