public @Nullable ConfigurationFromContext findOrCreateConfigurationFromContext(@NotNull ConfigurationContext context) {
    Location location = context.getLocation();
    if (location == null) {
      return null;
    }

    ConfigurationFromContext fromContext = createConfigurationFromContext(context);
    if (fromContext == null) {
      return null;
    }

    final PsiElement psiElement = fromContext.getSourceElement();
    final Location<PsiElement> _location = PsiLocation.fromPsiElement(psiElement, location.getModule());
    if (_location != null) {
      // replace with existing configuration if any
      RunnerAndConfigurationSettings settings = findExistingConfiguration(context);
      if (settings == null) {
        RunManager.getInstance(context.getProject()).setUniqueNameIfNeeded(fromContext.getConfiguration());
      }
      else {
        fromContext.setConfigurationSettings(settings);
      }
    }

    return fromContext;
  }
public @Nullable ConfigurationFromContext findOrCreateConfigurationFromContext(@NotNull ConfigurationContext context)