This commit is contained in:
parent
c90bdfe0e8
commit
7aa7f84d1a
|
@ -401,20 +401,18 @@ var wide = {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (data.cmd) {
|
switch (data.cmd) {
|
||||||
case 'run': // 正在运行
|
case 'run':
|
||||||
|
if (!wide.curProcessId) { // output first time
|
||||||
if(!wide.curProcessId){
|
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
||||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
} else { // the following outputs
|
||||||
}else{
|
|
||||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html().replace(/<\/pre>$/g, data.output + '</pre>'));
|
bottomGroup.fillOutput($('.bottom-window-group .output > div').html().replace(/<\/pre>$/g, data.output + '</pre>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
wide.curProcessId = data.pid;
|
wide.curProcessId = data.pid;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'run-done': // 运行结束
|
case 'run-done':
|
||||||
wide.curProcessId = undefined;
|
wide.curProcessId = undefined;
|
||||||
// 运行结束后修改 [构建&运行] 图标状态为可用状态
|
|
||||||
$(".toolbars .ico-stop").removeClass("ico-stop")
|
$(".toolbars .ico-stop").removeClass("ico-stop")
|
||||||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||||
|
|
||||||
|
@ -435,7 +433,7 @@ var wide = {
|
||||||
case 'build':
|
case 'build':
|
||||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
||||||
|
|
||||||
if (data.lints) { // 说明编译有错误输出
|
if (data.lints) { // has build error
|
||||||
for (var i = 0; i < data.lints.length; i++) {
|
for (var i = 0; i < data.lints.length; i++) {
|
||||||
var lint = data.lints[i];
|
var lint = data.lints[i];
|
||||||
|
|
||||||
|
@ -448,7 +446,7 @@ var wide = {
|
||||||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触发一次 gutter lint
|
// trigger gutter lint
|
||||||
CodeMirror.signal(wide.curEditor, "change", wide.curEditor);
|
CodeMirror.signal(wide.curEditor, "change", wide.curEditor);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue