@Override
  public void createAndRunConfiguration(@NotNull ServerType<?> serverType,
                                        @Nullable RemoteServer<?> remoteServer,
                                        @Nullable DeploymentSourceType<?> sourceType) {
    DeployToServerConfigurationType<?> configurationType = DeployToServerConfigurationTypesRegistrar.getInstance()
      .getConfigurationType(serverType);
    RunManager runManager = RunManager.getInstance(myProject);
    ConfigurationFactory factory = configurationType.getFactoryForType(sourceType);
    RunnerAndConfigurationSettings settings = runManager.createConfiguration(configurationType.getDisplayName(), factory);
    DeployToServerRunConfiguration<?, ?> runConfiguration = (DeployToServerRunConfiguration<?, ?>)settings.getConfiguration();
    runConfiguration.onNewConfigurationCreated();
    if (remoteServer != null) {
      runConfiguration.setServerName(remoteServer.getName());
    }
    if (RunDialog.editConfiguration(myProject, settings, CloudBundle.message("dialog.title.create.deployment.configuration"),
                                    DefaultRunExecutor.getRunExecutorInstance())) {
      runManager.addConfiguration(settings);
      runManager.setSelectedConfiguration(settings);
      ProgramRunnerUtil.executeConfiguration(settings, DefaultRunExecutor.getRunExecutorInstance());
    }
  }
@Override
  public void createAndRunConfiguration(@NotNull ServerType<?> serverType,
                                        @Nullable RemoteServer<?> remoteServer,
                                        @Nullable DeploymentSourceType<?> sourceType)