public static <SC extends ServerConfiguration, DC extends DeploymentConfiguration>
  DeployToServerRunConfiguration<SC, DC> createRunConfiguration(@NotNull RemoteServer<SC> account,
                                                                @NotNull Module module,
                                                                @NotNull DeploymentSource deploymentSource,
                                                                DC deploymentConfiguration) {

    final RunManager runManager = RunManager.getInstance(module.getProject());
    String name = generateRunConfigurationName(account, module);

    ConfigurationFactory configurationFactory = DeployToServerConfigurationTypesRegistrar.getInstance()
      .getConfigurationType(account.getType())
      .getFactoryForType(deploymentSource.getType());
    final RunnerAndConfigurationSettings runSettings = runManager.createConfiguration(name, configurationFactory);
    @SuppressWarnings("unchecked")
    DeployToServerRunConfiguration<SC, DC> result = (DeployToServerRunConfiguration<SC, DC>)runSettings.getConfiguration();
    result.setServerName(account.getName());
    result.setDeploymentSource(deploymentSource);
    result.setDeploymentConfiguration(deploymentConfiguration);
    RunManagerImplKt.callNewConfigurationCreated(configurationFactory, runSettings.getConfiguration());

    runManager.addConfiguration(runSettings);
    runManager.setSelectedConfiguration(runSettings);

    return result;
  }
public static <SC extends ServerConfiguration, DC extends DeploymentConfiguration>
  DeployToServerRunConfiguration<SC, DC> createRunConfiguration(@NotNull RemoteServer<SC> account,
                                                                @NotNull Module module,
                                                                @NotNull DeploymentSource deploymentSource,
                                                                DC deploymentConfiguration)