@Nullable
  protected RunContentDescriptor createContentDescriptor(@NotNull RunProfileState state,
                                                         @NotNull ExecutionEnvironment environment) throws ExecutionException {
    if (state instanceof JavaCommandLine) {
      JavaParameters parameters = ((JavaCommandLine)state).getJavaParameters();
      boolean isPollConnection = true;
      RemoteConnection connection = null;
      if (state instanceof RemoteConnectionCreator) {
        connection = ((RemoteConnectionCreator)state).createRemoteConnection(environment);
        isPollConnection = ((RemoteConnectionCreator)state).isPollConnection();
      }
      if (connection == null) {
        int transport = DebuggerSettings.getInstance().getTransport();
        connection = new RemoteConnectionBuilder(true, transport, transport == DebuggerSettings.SOCKET_TRANSPORT ? "0" : "")
          .asyncAgent(true)
          .project(environment.getProject())
          .create(parameters);
        isPollConnection = true;
      }

      return attachVirtualMachine(state, environment, connection, isPollConnection);
    }
    if (state instanceof PatchedRunnableState) {
      RemoteConnection connection =
        doPatch(new JavaParameters(), environment.getRunnerSettings(), true, environment.getProject());
      return attachVirtualMachine(state, environment, connection, true);
    }
    if (state instanceof RemoteState) {
      final RemoteConnection connection = createRemoteDebugConnection((RemoteState)state, environment.getRunnerSettings());
      return attachVirtualMachine(state, environment, connection, false);
    }

    return null;
  }
@Nullable
  protected RunContentDescriptor createContentDescriptor(@NotNull RunProfileState state,
                                                         @NotNull ExecutionEnvironment environment)