private static @Nullable List<ConfigurationFromContext> getConfigurationsFromAlternativeLocations(
    @NotNull MultipleRunLocationsProvider.AlternativeLocationsInfo alternativeLocationsInfo,
    @NotNull Location originalLocation,
    boolean strict,
    boolean preferExisting
  ) {
    List<ConfigurationFromContext> result = new SmartList<>();
    for (Location alternativeLocation : alternativeLocationsInfo.getAlternativeLocations()) {
      ConfigurationContext fakeContextForAlternativeLocation = ConfigurationContext.createEmptyContextForLocation(alternativeLocation);
      List<ConfigurationFromContext> configurationsForLocation =
        doGetConfigurationsFromContext(alternativeLocation, fakeContextForAlternativeLocation, strict, preferExisting);
      if (configurationsForLocation != null) {
        for (ConfigurationFromContext configurationFromContext : configurationsForLocation) {
          configurationFromContext.setFromAlternativeLocation(true);
          String locationDisplayName = alternativeLocationsInfo.getProvider().getLocationDisplayName(alternativeLocation, originalLocation);
          configurationFromContext.setAlternativeLocationDisplayName(locationDisplayName);
          RunConfiguration configuration = configurationFromContext.getConfiguration();
          if (configuration instanceof LocatableConfigurationBase && ((LocatableConfiguration)configuration).isGeneratedName()) {
            configuration.setName(configuration.getName() + " " + locationDisplayName);
            ((LocatableConfigurationBase<?>)configuration).setNameChangedByUser(true);
          }
        }

        result.addAll(configurationsForLocation);
      }
    }
    return ContainerUtil.nullize(result);
  }
private static @Nullable List<ConfigurationFromContext> getConfigurationsFromAlternativeLocations(
    @NotNull MultipleRunLocationsProvider.AlternativeLocationsInfo alternativeLocationsInfo,
    @NotNull Location originalLocation,
    boolean strict,
    boolean preferExisting
  )