use of com.intellij.javascript.debugger.execution.JavaScriptDebugConfiguration in project intellij-plugins by JetBrains.
the class DartProjectTemplate method createWebRunConfiguration.
static void createWebRunConfiguration(@NotNull final Module module, @NotNull final VirtualFile htmlFile) {
DartModuleBuilder.runWhenNonModalIfModuleNotDisposed(() -> {
final WebBrowser dartium = DartiumUtil.getDartiumBrowser();
if (dartium == null)
return;
final Url url = WebBrowserServiceImpl.getDebuggableUrl(PsiManager.getInstance(module.getProject()).findFile(htmlFile));
if (url == null)
return;
final RunManager runManager = RunManager.getInstance(module.getProject());
try {
final RunnerAndConfigurationSettings settings = runManager.createRunConfiguration("", JavascriptDebugConfigurationType.getTypeInstance().getFactory());
((JavaScriptDebugConfiguration) settings.getConfiguration()).setUri(url.toDecodedForm());
((JavaScriptDebugConfiguration) settings.getConfiguration()).setEngineId(dartium.getId().toString());
settings.setName(((JavaScriptDebugConfiguration) settings.getConfiguration()).suggestedName());
runManager.addConfiguration(settings, false);
runManager.setSelectedConfiguration(settings);
} catch (Throwable t) {
/* ClassNotFound in IDEA Community or if JS Debugger plugin disabled */
}
}, module);
}
Aggregations