public @Nullable ConfigurationFromContext createConfigurationFromContext(@NotNull ConfigurationContext context) {
    final RunnerAndConfigurationSettings settings = cloneTemplateConfiguration(context);
    Ref<PsiElement> ref = new Ref<>(context.getPsiLocation());
    try {
      //noinspection unchecked
      if (!setupConfigurationFromContext((T)settings.getConfiguration(), context, ref)) {
       return null;
     }
    }
    catch (ClassCastException e) {
      LOG.error(getConfigurationFactory() + " produced wrong type", e);
      return null;
    }
    catch (ProcessCanceledException | IndexNotReadyException e) {
      throw e;
    }
    catch (Throwable e) {
      LOG.error(e);
      return null;
    }
    return new ConfigurationFromContextImpl(this, settings, ref.get());
  }
public @Nullable ConfigurationFromContext createConfigurationFromContext(@NotNull ConfigurationContext context)