Skip to content

Commit 1e39877

Browse files
committed
devtools: land initial support for selected compiler display in the prompt
1 parent 738a4e7 commit 1e39877

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

resources/unpacked/devtools/front_end/console/ConsoleView.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,24 +559,34 @@ WebInspector.ConsoleView.prototype = {
559559
}
560560
},
561561

562-
_refreshNs: function () {
562+
_refreshPromptInfo: function () {
563563
var promptDescriptor = this._prompts[this._activePromptIndex];
564564
if (promptDescriptor.id != "dirac") {
565565
return;
566566
}
567567

568-
var label = this._currentNs?this._currentNs:"";
568+
var label = this._currentNamespace ? this._currentNamespace : "";
569+
if (this._currentCompiler) {
570+
label += " » " + this._currentCompiler;
571+
}
569572
promptDescriptor.codeMirror.setOption("placeholder", label);
570573
},
571574

572575
setDiracPromptNS: function(name)
573576
{
574577
dirac.feedback("setDiracPromptNS('"+name+"')");
575-
this._currentNs = name;
578+
this._currentNamespace = name;
576579
if (this._diracPromptDescriptor) {
577580
this._diracPromptDescriptor.prompt.setCurrentClojureScriptNamespace(name);
578581
}
579-
this._refreshNs();
582+
this._refreshPromptInfo();
583+
},
584+
585+
setDiracPromptCompiler: function(name)
586+
{
587+
dirac.feedback("setDiracPromptCompiler('"+name+"')");
588+
this._currentCompiler = name;
589+
this._refreshPromptInfo();
580590
},
581591

582592
onJobStarted: function(requestId) {

0 commit comments

Comments
 (0)