}
public RunnerAndConfigurationSettings createConfigurationByLocation(Location location) {
PsiFile file = location.getPsiElement().getContainingFile();
if (file instanceof ClojureFile) {
ClojureFile clojureFile = (ClojureFile) file;
RunnerAndConfigurationSettings settings = RunManager.getInstance(location.getProject()).
createRunConfiguration("", myConfigurationFactory);
ClojureScriptRunConfiguration configuration = (ClojureScriptRunConfiguration) settings.getConfiguration();
PsiDirectory dir = clojureFile.getContainingDirectory();
assert dir != null;
configuration.setWorkDir(dir.getVirtualFile().getPath());
VirtualFile vFile = clojureFile.getVirtualFile();
assert vFile != null;
configuration.setScriptPath(vFile.getPath());
configuration.setName(vFile.getNameWithoutExtension());
configuration.setModule(ModuleUtil.findModuleForPsiElement(clojureFile));
return settings;