protected RunnerAndConfigurationSettingsImpl createConfigurationByElement(Location location, ConfigurationContext configurationContext) {
location = ExecutionUtil.stepIntoSingleClass(location);
PsiClass aClass = configurationType.getBehaviorClass(location.getPsiElement());
if (aClass == null) return null;
PsiMethod currentMethod = configurationType.getBehaviourMethodElement(location.getPsiElement());
RunnerAndConfigurationSettingsImpl settings = cloneTemplateConfiguration(location.getProject(), configurationContext);
JBehaveRunConfiguration configuration = (JBehaveRunConfiguration) settings.getConfiguration();
configuration.setBehaviorClass(ClassUtil.fullName(aClass));
if (currentMethod != null) {
configuration.setBehaviorMethod(currentMethod.getName());
}
configuration.setModule(ExecutionUtil.findModule(aClass));